diff --git a/Gpios.c b/Gpios.c index 2a5a9c0..0b68eda 100644 --- a/Gpios.c +++ b/Gpios.c @@ -31,4 +31,13 @@ void Gpios_Init() { GpioPinSet(&env->CAN1_STB, false); Gpios_Led(&env->Led); + + + env->COON_A_B9_B10.En1 = InitGpioPin(GPIOD, GPIO_PINS_7, GPIO_MODE_OUTPUT, GPIO_PIN_NOREVERSE); + env->COON_A_B9_B10.En2 = InitGpioPin(GPIOD, GPIO_PINS_8, GPIO_MODE_OUTPUT, GPIO_PIN_NOREVERSE); + + env->COON_A_B9_B10.Con.A = InitGpioPin(GPIOD, GPIO_PINS_4, GPIO_MODE_OUTPUT, GPIO_PIN_NOREVERSE); + env->COON_A_B9_B10.Con.B = InitGpioPin(GPIOD, GPIO_PINS_5, GPIO_MODE_OUTPUT, GPIO_PIN_NOREVERSE); + env->COON_A_B9_B10.Con.C = InitGpioPin(GPIOD, GPIO_PINS_6, GPIO_MODE_OUTPUT, GPIO_PIN_NOREVERSE); + } \ No newline at end of file diff --git a/Gpios.h b/Gpios.h index 1675082..4539705 100644 --- a/Gpios.h +++ b/Gpios.h @@ -8,12 +8,17 @@ #include "SerialPorts.h" #include "GpioPin.h" #include "PowerManagement.h" +#include "Sensor.h" +#include "SpiPorts.h" typedef struct { tLed Led; tRs485DirectionPins comIntDir; tGpioPin CAN1_STB; tGpioPin CAN2_STB; + tSpiChipSelectPins SpiChipSelectPins; + tConn COON_A_B9_B10; + } tGpios; extern tGpios GPIOS;