Source-only snapshot of the 1.2 release. Drivers/ (the vendored ST HAL and CMSIS) is excluded at 173 MB; fetch it from STMicroelectronics/STM32CubeH5 to build.
190 lines
4.4 KiB
C
190 lines
4.4 KiB
C
/**
|
|
* This file contains #defines for the ports and pins used by the EEP-144 functions
|
|
* and is shared by all modules
|
|
*/
|
|
|
|
#ifndef __YEEP144_PINOUT_H
|
|
#define __YEEP144_PINOUT_H
|
|
|
|
// DC Motors
|
|
|
|
#define MOT1A_PORT GPIOG
|
|
#define MOT1A_PIN GPIO_PIN_0
|
|
#define MOT1B_PORT GPIOG
|
|
#define MOT1B_PIN GPIO_PIN_1
|
|
#define MOT1PWM_PORT GPIOC
|
|
#define MOT1PWM_PIN GPIO_PIN_6
|
|
|
|
#define MOT2A_PORT GPIOG
|
|
#define MOT2A_PIN GPIO_PIN_2
|
|
#define MOT2B_PORT GPIOG
|
|
#define MOT2B_PIN GPIO_PIN_3
|
|
#define MOT2PWM_PORT GPIOC
|
|
#define MOT2PWM_PIN GPIO_PIN_7
|
|
|
|
#define MOT3A_PORT GPIOE
|
|
#define MOT3A_PIN GPIO_PIN_7
|
|
#define MOT3B_PORT GPIOE
|
|
#define MOT3B_PIN GPIO_PIN_8
|
|
#define MOT3PWM_PORT GPIOB
|
|
#define MOT3PWM_PIN GPIO_PIN_0
|
|
|
|
#define MOT4A_PORT GPIOB
|
|
#define MOT4A_PIN GPIO_PIN_2
|
|
#define MOT4B_PORT GPIOB
|
|
#define MOT4B_PIN GPIO_PIN_4
|
|
#define MOT4PWM_PORT GPIOC
|
|
#define MOT4PWM_PIN GPIO_PIN_9
|
|
|
|
// DC Motor Encoders
|
|
|
|
#define ENC1A_PORT GPIOD
|
|
#define ENC1A_PIN GPIO_PIN_12
|
|
#define ENC1B_PORT GPIOD
|
|
#define ENC1B_PIN GPIO_PIN_13
|
|
|
|
#define ENC2A_PORT GPIOC
|
|
#define ENC2A_PIN GPIO_PIN_11
|
|
#define ENC2B_PORT GPIOA
|
|
#define ENC2B_PIN GPIO_PIN_15
|
|
|
|
#define ENC3A_PORT GPIOF
|
|
#define ENC3A_PIN GPIO_PIN_2
|
|
#define ENC3B_PORT GPIOF
|
|
#define ENC3B_PIN GPIO_PIN_9
|
|
|
|
#define ENC4A_PORT GPIOB
|
|
#define ENC4A_PIN GPIO_PIN_10
|
|
#define ENC4B_PORT GPIOD
|
|
#define ENC4B_PIN GPIO_PIN_11
|
|
|
|
// Servos
|
|
#define SERVO1_PORT GPIOA
|
|
#define SERVO1_PIN GPIO_PIN_0
|
|
#define SERVO2_PORT GPIOA
|
|
#define SERVO2_PIN GPIO_PIN_3
|
|
#define SERVO3_PORT GPIOF
|
|
#define SERVO3_PIN GPIO_PIN_8
|
|
#define SERVO4_PORT GPIOF
|
|
#define SERVO4_PIN GPIO_PIN_7
|
|
|
|
// Buzzer
|
|
|
|
#define BUZZER_PORT GPIOF
|
|
#define BUZZER_PIN GPIO_PIN_7
|
|
|
|
// UART
|
|
|
|
#define UART2_TX_PORT GPIOD
|
|
#define UART2_TX_PIN GPIO_PIN_5
|
|
#define UART2_RX_PORT GPIOD
|
|
#define UART2_RX_PIN GPIO_PIN_6
|
|
#define UART2_RTS_PORT GPIOD
|
|
#define UART2_RTS_PIN GPIO_PIN_4
|
|
#define UART2_CTS_PORT GPIOD
|
|
#define UART2_CTS_PIN GPIO_PIN_3
|
|
|
|
#define UART3_TX_PORT GPIOD
|
|
#define UART3_TX_PIN GPIO_PIN_9
|
|
#define UART3_RX_PORT GPIOD
|
|
#define UART3_RX_PIN GPIO_PIN_8
|
|
|
|
#define UART4_TX_PORT GPIOD
|
|
#define UART4_TX_PIN GPIO_PIN_1
|
|
#define UART4_RX_PORT GPIOD
|
|
#define UART4_RX_PIN GPIO_PIN_0
|
|
|
|
// I2C
|
|
|
|
#define I2C_SDA_PORT GPIOF
|
|
#define I2C_SDA_PIN GPIO_PIN_0
|
|
#define I2C_SCL_PORT GPIOF
|
|
#define I2C_SCL_PIN GPIO_PIN_1
|
|
|
|
// SPI
|
|
#define SPI_MISO_PORT GPIOE
|
|
#define SPI_MISO_PIN GPIO_PIN_5
|
|
#define SPI_MOSI_PORT GPIOE
|
|
#define SPI_MOSI_PIN GPIO_PIN_6
|
|
#define SPI_SCK_PORT GPIOE
|
|
#define SPI_SCK_PIN GPIO_PIN_12
|
|
#define SPI_CS_PORT GPIOE
|
|
#define SPI_CS_PIN GPIO_PIN_4
|
|
|
|
// Ultrasonic Distance Sensors
|
|
|
|
#define USONIC1_TRIG_PORT GPIOE
|
|
#define USONIC1_TRIG_PIN GPIO_PIN_0
|
|
#define USONIC1_ECHO_PORT GPIOC
|
|
#define USONIC1_ECHO_PIN GPIO_PIN_10
|
|
#define USONIC1_ECHO_EXTI EXTI10_IRQn
|
|
|
|
#define USONIC2_TRIG_PORT GPIOE
|
|
#define USONIC2_TRIG_PIN GPIO_PIN_2
|
|
#define USONIC2_ECHO_PORT GPIOG
|
|
#define USONIC2_ECHO_PIN GPIO_PIN_10
|
|
#define USONIC2_ECHO_EXTI EXTI10_IRQn
|
|
|
|
#define USONIC3_TRIG_PORT GPIOE
|
|
#define USONIC3_TRIG_PIN GPIO_PIN_3
|
|
#define USONIC3_ECHO_PORT GPIOE
|
|
#define USONIC3_ECHO_PIN GPIO_PIN_10
|
|
#define USONIC3_ECHO_EXTI EXTI10_IRQn
|
|
|
|
#define USONIC4_TRIG_PORT GPIOE
|
|
#define USONIC4_TRIG_PIN GPIO_PIN_15
|
|
#define USONIC4_ECHO_PORT GPIOF
|
|
#define USONIC4_ECHO_PIN GPIO_PIN_12
|
|
#define USONIC4_ECHO_EXTI EXTI12_IRQn
|
|
|
|
// Pushbuttons
|
|
|
|
#define BUTTON_BLUE_PORT GPIOC
|
|
#define BUTTON_BLUE_PIN GPIO_PIN_13
|
|
#define BUTTON_BLUE_EXTI EXTI13_IRQn
|
|
#define BUTTON_0_PORT GPIOC
|
|
#define BUTTON_0_PIN GPIO_PIN_13
|
|
#define BUTTON_0_EXTI EXTI13_IRQn
|
|
|
|
#define BUTTON_GREEN_PORT GPIOD
|
|
#define BUTTON_GREEN_PIN GPIO_PIN_7
|
|
#define BUTTON_GREEN_EXTI EXTI7_IRQn
|
|
#define BUTTON_1_PORT GPIOD
|
|
#define BUTTON_1_PIN GPIO_PIN_7
|
|
#define BUTTON_1_EXTI EXTI7_IRQn
|
|
|
|
#define BUTTON_YELLOW_PORT GPIOG
|
|
#define BUTTON_YELLOW_PIN GPIO_PIN_6
|
|
#define BUTTON_YELLOW_EXTI EXTI6_IRQn
|
|
#define BUTTON_2_PORT GPIOG
|
|
#define BUTTON_2_PIN GPIO_PIN_6
|
|
#define BUTTON_2_EXTI EXTI6_IRQn
|
|
|
|
#define BUTTON_RED_PORT GPIOB
|
|
#define BUTTON_RED_PIN GPIO_PIN_12
|
|
#define BUTTON_RED_EXTI EXTI12_IRQn
|
|
#define BUTTON_3_PORT GPIOB
|
|
#define BUTTON_3_PIN GPIO_PIN_12
|
|
#define BUTTON_3_EXTI EXTI12_IRQn
|
|
|
|
// Potentiometers
|
|
|
|
#define POT1_PORT GPIOF
|
|
#define POT1_PIN GPIO_PIN_13
|
|
#define POT2_PORT GPIOF
|
|
#define POT2_PIN GPIO_PIN_14
|
|
|
|
// SD Card
|
|
#define SD_CK_PORT GPIOC
|
|
#define SD_CK_PIN GPIO_PIN_12
|
|
#define SD_CMD_PORT GPIOD
|
|
#define SD_CMD_PIN GPIO_PIN_2
|
|
#define SD_D0_PORT GPIOC
|
|
#define SD_D0_PIN GPIO_PIN_8
|
|
|
|
// IR Beacon Receiver
|
|
#define IR_RECEIVER_PIN GPIO_PIN_3
|
|
#define IR_RECEIVER_PORT GPIOF
|
|
#define IR_RECEIVER_EXTI EXTI3_IRQn
|
|
|
|
#endif |