Skip to content
This repository has been archived by the owner on Jul 6, 2019. It is now read-only.

Commit

Permalink
k20: Fix interrupt vector tables
Browse files Browse the repository at this point in the history
It's not clear where these came from but they certainly aren't what is
listed in rev. 2 of the K20 reference manual.
  • Loading branch information
bgamari committed Oct 20, 2014
1 parent d1f99b7 commit 1f77b4b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 104 deletions.
28 changes: 2 additions & 26 deletions src/zinc/hal/k20/iomem.ld
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,16 @@ PROVIDE(isr_dma_0 = isr_default_fault);
PROVIDE(isr_dma_1 = isr_default_fault);
PROVIDE(isr_dma_2 = isr_default_fault);
PROVIDE(isr_dma_3 = isr_default_fault);
PROVIDE(isr_dma_4 = isr_default_fault);
PROVIDE(isr_dma_5 = isr_default_fault);
PROVIDE(isr_dma_6 = isr_default_fault);
PROVIDE(isr_dma_7 = isr_default_fault);
PROVIDE(isr_dma_8 = isr_default_fault);
PROVIDE(isr_dma_9 = isr_default_fault);
PROVIDE(isr_dma_10 = isr_default_fault);
PROVIDE(isr_dma_11 = isr_default_fault);
PROVIDE(isr_dma_12 = isr_default_fault);
PROVIDE(isr_dma_13 = isr_default_fault);
PROVIDE(isr_dma_14 = isr_default_fault);
PROVIDE(isr_dma_15 = isr_default_fault);
PROVIDE(isr_dma_err = isr_default_fault);
PROVIDE(isr_flash_complete = isr_default_fault);
PROVIDE(isr_flash_collision = isr_default_fault);
PROVIDE(isr_low_volt = isr_default_fault);
PROVIDE(isr_llwu = isr_default_fault);
PROVIDE(isr_wdt = isr_default_fault);
PROVIDE(isr_i2c_0 = isr_default_fault);
PROVIDE(isr_i2c_1 = isr_default_fault);
PROVIDE(isr_spi_0 = isr_default_fault);
PROVIDE(isr_spi_1 = isr_default_fault);
PROVIDE(isr_can_0_msg = isr_default_fault);
PROVIDE(isr_can_0_bus = isr_default_fault);
PROVIDE(isr_can_0_err = isr_default_fault);
PROVIDE(isr_can_0_tx = isr_default_fault);
PROVIDE(isr_can_0_rx = isr_default_fault);
PROVIDE(isr_can_0_wake = isr_default_fault);
PROVIDE(isr_i2s_0_tx = isr_default_fault);
PROVIDE(isr_i2s_0_rx = isr_default_fault);
PROVIDE(isr_i2s_0 = isr_default_fault);
PROVIDE(isr_i2s_1 = isr_default_fault);
PROVIDE(isr_uart_0_lon = isr_default_fault);
PROVIDE(isr_uart_0_stat = isr_default_fault);
PROVIDE(isr_uart_0_err = isr_default_fault);
Expand All @@ -42,13 +22,10 @@ PROVIDE(isr_uart_1_err = isr_default_fault);
PROVIDE(isr_uart_2_stat = isr_default_fault);
PROVIDE(isr_uart_2_err = isr_default_fault);
PROVIDE(isr_adc_0 = isr_default_fault);
PROVIDE(isr_adc_1 = isr_default_fault);
PROVIDE(isr_cmp_0 = isr_default_fault);
PROVIDE(isr_cmp_1 = isr_default_fault);
PROVIDE(isr_cmp_2 = isr_default_fault);
PROVIDE(isr_ftm_0 = isr_default_fault);
PROVIDE(isr_ftm_1 = isr_default_fault);
PROVIDE(isr_ftm_2 = isr_default_fault);
PROVIDE(ist_cmt = isr_default_fault);
PROVIDE(isr_rtc_alarm = isr_default_fault);
PROVIDE(isr_rtc_tick = isr_default_fault);
Expand All @@ -59,7 +36,6 @@ PROVIDE(isr_pit_3 = isr_default_fault);
PROVIDE(isr_pdb = isr_default_fault);
PROVIDE(isr_usb = isr_default_fault);
PROVIDE(isr_usb_dcd = isr_default_fault);
PROVIDE(isr_dac_0 = isr_default_fault);
PROVIDE(isr_tsi = isr_default_fault);
PROVIDE(isr_mcg = isr_default_fault);
PROVIDE(isr_lptimer = isr_default_fault);
Expand Down
83 changes: 5 additions & 78 deletions src/zinc/hal/k20/isr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,36 +21,16 @@ extern {
fn isr_dma_1();
fn isr_dma_2();
fn isr_dma_3();
fn isr_dma_4();
fn isr_dma_5();
fn isr_dma_6();
fn isr_dma_7();
fn isr_dma_8();
fn isr_dma_9();
fn isr_dma_10();
fn isr_dma_11();
fn isr_dma_12();
fn isr_dma_13();
fn isr_dma_14();
fn isr_dma_15();
fn isr_dma_err();
fn isr_flash_complete();
fn isr_flash_collision();
fn isr_low_volt();
fn isr_llwu();
fn isr_wdt();
fn isr_i2c_0();
fn isr_i2c_1();
fn isr_spi_0();
fn isr_spi_1();
fn isr_can_0_msg();
fn isr_can_0_bus();
fn isr_can_0_err();
fn isr_can_0_tx();
fn isr_can_0_rx();
fn isr_can_0_wake();
fn isr_i2s_0_tx();
fn isr_i2s_0_rx();
fn isr_i2s_0();
fn isr_i2s_1();
fn isr_uart_0_lon();
fn isr_uart_0_stat();
fn isr_uart_0_err();
Expand All @@ -59,13 +39,10 @@ extern {
fn isr_uart_2_stat();
fn isr_uart_2_err();
fn isr_adc_0();
fn isr_adc_1();
fn isr_cmp_0();
fn isr_cmp_1();
fn isr_cmp_2();
fn isr_ftm_0();
fn isr_ftm_1();
fn isr_ftm_2();
fn ist_cmt();
fn isr_rtc_alarm();
fn isr_rtc_tick();
Expand All @@ -76,7 +53,6 @@ extern {
fn isr_pdb();
fn isr_usb();
fn isr_usb_dcd();
fn isr_dac_0();
fn isr_tsi();
fn isr_mcg();
fn isr_lptimer();
Expand All @@ -89,7 +65,7 @@ extern {
}

#[allow(non_upper_case_globals)]
const ISRCount: uint = 95;
const ISRCount: uint = 46;

#[link_section=".isr_vector_nvic"]
#[allow(non_upper_case_globals)]
Expand All @@ -99,67 +75,29 @@ pub static NVICVectors: [Option<unsafe extern fn()>, ..ISRCount] = [
Some(isr_dma_1),
Some(isr_dma_2),
Some(isr_dma_3),
Some(isr_dma_4),
Some(isr_dma_5),
Some(isr_dma_6),
Some(isr_dma_7),
Some(isr_dma_8),
Some(isr_dma_9),
Some(isr_dma_10),
Some(isr_dma_11),
Some(isr_dma_12),
Some(isr_dma_13),
Some(isr_dma_14),
Some(isr_dma_15),
Some(isr_dma_err),
None,
Some(isr_flash_complete),
Some(isr_flash_collision),
Some(isr_low_volt),
Some(isr_llwu),
Some(isr_wdt),
None,
Some(isr_i2c_0),
Some(isr_i2c_1),
Some(isr_spi_0),
Some(isr_spi_1),
None,
Some(isr_can_0_msg),
Some(isr_can_0_bus),
Some(isr_can_0_err),
Some(isr_can_0_tx),
Some(isr_can_0_rx),
Some(isr_can_0_wake),
Some(isr_i2s_0_tx),
Some(isr_i2s_0_rx),
None,
None,
None,
None,
None,
None,
None,
Some(isr_i2s_0),
Some(isr_i2s_1),
Some(isr_uart_0_lon),
Some(isr_uart_0_stat),
Some(isr_uart_0_err),
Some(isr_uart_1_stat),
Some(isr_uart_1_err),
Some(isr_uart_2_stat),
Some(isr_uart_2_err),
None,
None,
None,
None,
None,
None,
Some(isr_adc_0),
Some(isr_adc_1),
Some(isr_cmp_0),
Some(isr_cmp_1),
Some(isr_cmp_2),
Some(isr_ftm_0),
Some(isr_ftm_1),
Some(isr_ftm_2),
Some(ist_cmt),
Some(isr_rtc_alarm),
Some(isr_rtc_tick),
Expand All @@ -170,24 +108,13 @@ pub static NVICVectors: [Option<unsafe extern fn()>, ..ISRCount] = [
Some(isr_pdb),
Some(isr_usb),
Some(isr_usb_dcd),
None,
None,
None,
None,
None,
None,
Some(isr_dac_0),
None,
Some(isr_tsi),
Some(isr_mcg),
Some(isr_lptimer),
None,
Some(isr_port_a),
Some(isr_port_b),
Some(isr_port_c),
Some(isr_port_d),
Some(isr_port_e),
None,
None,
Some(isr_soft),
];

0 comments on commit 1f77b4b

Please sign in to comment.