Init
This commit is contained in:
parent
053dfc28ba
commit
689e55b9d6
9
Gpios.c
9
Gpios.c
|
|
@ -31,4 +31,13 @@ void Gpios_Init() {
|
||||||
GpioPinSet(&env->CAN1_STB, false);
|
GpioPinSet(&env->CAN1_STB, false);
|
||||||
|
|
||||||
Gpios_Led(&env->Led);
|
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);
|
||||||
|
|
||||||
}
|
}
|
||||||
5
Gpios.h
5
Gpios.h
|
|
@ -8,12 +8,17 @@
|
||||||
#include "SerialPorts.h"
|
#include "SerialPorts.h"
|
||||||
#include "GpioPin.h"
|
#include "GpioPin.h"
|
||||||
#include "PowerManagement.h"
|
#include "PowerManagement.h"
|
||||||
|
#include "Sensor.h"
|
||||||
|
#include "SpiPorts.h"
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
tLed Led;
|
tLed Led;
|
||||||
tRs485DirectionPins comIntDir;
|
tRs485DirectionPins comIntDir;
|
||||||
tGpioPin CAN1_STB;
|
tGpioPin CAN1_STB;
|
||||||
tGpioPin CAN2_STB;
|
tGpioPin CAN2_STB;
|
||||||
|
tSpiChipSelectPins SpiChipSelectPins;
|
||||||
|
tConn COON_A_B9_B10;
|
||||||
|
|
||||||
} tGpios;
|
} tGpios;
|
||||||
|
|
||||||
extern tGpios GPIOS;
|
extern tGpios GPIOS;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue