Commit 064b5e49 authored by Christos Gentsos's avatar Christos Gentsos

Main: fix wrong pin assignments in the fantray variant

parent c3b39e0c
Pipeline #2942 failed with stage
in 0 seconds
......@@ -293,13 +293,13 @@ drivers:
definition: Atmel:SAMD21_Drivers:0.0.1::SAMD21G18A-MF::optional_signal_definition::EIC.EXTINT.0
name: EIC/EXTINT/0
label: EXTINT/0
- identifier: EXTERNAL_IRQ_0:EXTINT/10
pad: PB10
- identifier: EXTERNAL_IRQ_0:EXTINT/1
pad: PA17
mode: Enabled
configuration: null
definition: Atmel:SAMD21_Drivers:0.0.1::SAMD21G18A-MF::optional_signal_definition::EIC.EXTINT.10
name: EIC/EXTINT/10
label: EXTINT/10
definition: Atmel:SAMD21_Drivers:0.0.1::SAMD21G18A-MF::optional_signal_definition::EIC.EXTINT.1
name: EIC/EXTINT/1
label: EXTINT/1
- identifier: EXTERNAL_IRQ_0:EXTINT/13
pad: PA13
mode: Enabled
......@@ -641,6 +641,13 @@ drivers:
tc_prescaler: No division
timer_event_control: false
optional_signals:
- identifier: PWM_2:WO/0
pad: PB10
mode: PWM output
configuration: null
definition: Atmel:SAMD21_Drivers:0.0.1::SAMD21G18A-MF::optional_signal_definition::TC5.WO.0
name: TC5/WO/0
label: WO/0
- identifier: PWM_2:WO/1
pad: PB11
mode: PWM output
......@@ -1145,7 +1152,7 @@ pads:
PB10:
name: PB10
definition: Atmel:SAMD21_Drivers:0.0.1::SAMD21G18A-MF::pad::PB10
mode: Digital input
mode: Peripheral IO
user_label: PB10
configuration: null
PB11:
......@@ -1169,7 +1176,7 @@ pads:
PA17:
name: PA17
definition: Atmel:SAMD21_Drivers:0.0.1::SAMD21G18A-MF::pad::PA17
mode: Digital output
mode: Digital input
user_label: PA17
configuration: null
PA18:
......
......@@ -683,7 +683,7 @@
// </e>
#ifndef CONFIG_EIC_EXTINT_MAP
#define CONFIG_EIC_EXTINT_MAP {0, PIN_PA16}, {10, PIN_PB10}, {13, PIN_PA13},
#define CONFIG_EIC_EXTINT_MAP {0, PIN_PA16}, {1, PIN_PA17}, {13, PIN_PA13},
#endif
// <<< end of configuration section >>>
......
......@@ -126,9 +126,9 @@ void EXTERNAL_IRQ_0_init(void)
gpio_set_pin_function(PA16, PINMUX_PA16A_EIC_EXTINT0);
// Set pin direction to input
gpio_set_pin_direction(PB10, GPIO_DIRECTION_IN);
gpio_set_pin_direction(PA17, GPIO_DIRECTION_IN);
gpio_set_pin_pull_mode(PB10,
gpio_set_pin_pull_mode(PA17,
// <y> Pull configuration
// <id> pad_pull_config
// <GPIO_PULL_OFF"> Off
......@@ -136,7 +136,7 @@ void EXTERNAL_IRQ_0_init(void)
// <GPIO_PULL_DOWN"> Pull-down
GPIO_PULL_OFF);
gpio_set_pin_function(PB10, PINMUX_PB10A_EIC_EXTINT10);
gpio_set_pin_function(PA17, PINMUX_PA17A_EIC_EXTINT1);
// Set pin direction to input
gpio_set_pin_direction(PA13, GPIO_DIRECTION_IN);
......@@ -254,6 +254,8 @@ void PWM_1_init(void)
void PWM_2_PORT_init(void)
{
gpio_set_pin_function(PB10, PINMUX_PB10E_TC5_WO0);
gpio_set_pin_function(PB11, PINMUX_PB11E_TC5_WO1);
}
......@@ -389,20 +391,6 @@ void system_init(void)
{
init_mcu();
// GPIO on PA17
gpio_set_pin_level(PA17,
// <y> Initial level
// <id> pad_initial_level
// <false"> Low
// <true"> High
false);
// Set pin direction to output
gpio_set_pin_direction(PA17, GPIO_DIRECTION_OUT);
gpio_set_pin_function(PA17, GPIO_PIN_FUNCTION_OFF);
// GPIO on PA20
// Set pin direction to input
......
......@@ -28,7 +28,7 @@ static void button_on_PA16_pressed(void)
{
}
static void button_on_PB10_pressed(void)
static void button_on_PA17_pressed(void)
{
}
......@@ -43,7 +43,7 @@ void EXTERNAL_IRQ_0_example(void)
{
ext_irq_register(PIN_PA16, button_on_PA16_pressed);
ext_irq_register(PIN_PB10, button_on_PB10_pressed);
ext_irq_register(PIN_PA17, button_on_PA17_pressed);
ext_irq_register(PIN_PA13, button_on_PA13_pressed);
}
......
......@@ -483,12 +483,12 @@ int main(void)
gpio_set_pin_pull_mode(ADDR2, GPIO_PULL_UP);
#if defined(MMFANT) || defined(MMPROT)
ext_irq_register(PIN_PA16, inc_tacho1);
ext_irq_register(PIN_PA13, inc_tacho2);
ext_irq_register(PIN_PB10, inc_tacho3);
ext_irq_register(PIN_PA17, inc_tacho1);
ext_irq_register(PIN_PA16, inc_tacho2);
ext_irq_register(PIN_PA13, inc_tacho3);
ext_irq_enable(PIN_PA17);
ext_irq_enable(PIN_PA16);
ext_irq_enable(PIN_PA13);
ext_irq_enable(PIN_PB10);
load_fan_config();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment