Header file for interfacing with the EDS-MB v1.0.0 for NUCLEO-L476RG

Dependents:   19E042PIM_V4_Z1 MQTT_TO_OLED MQTT-OLED 19E042PIM_T3_2020_0031 ... more

Committer:
tzwell
Date:
Thu Nov 25 08:29:40 2021 +0000
Revision:
1:5722459a201f
Parent:
0:d112eae21aff
Changed PC_8 pin name to MB_SW2 instead of MB_SW1.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
tzwell 0:d112eae21aff 1 /*
tzwell 0:d112eae21aff 2 * This file contains all the pin names neccessary
tzwell 0:d112eae21aff 3 * for easy interaction with the EDS-MB for NUCLEOL476RG.
tzwell 0:d112eae21aff 4 *
tzwell 0:d112eae21aff 5 * University of Belgrade - School of Electrical Engineering
tzwell 0:d112eae21aff 6 * Department of Electronics
tzwell 0:d112eae21aff 7 * Bulevar Kralja Aleksandra 73, 11120 Belgrade, Serbia
tzwell 0:d112eae21aff 8 *
tzwell 0:d112eae21aff 9 * November 2021.
tzwell 0:d112eae21aff 10 *
tzwell 0:d112eae21aff 11 */
tzwell 0:d112eae21aff 12
tzwell 0:d112eae21aff 13 // LEDs, 560R in series, cathode to GND; left - red LED1; right - blue LED2:
tzwell 0:d112eae21aff 14 #define MB_LED1 PA_11
tzwell 0:d112eae21aff 15 #define MB_LED2 PB_15
tzwell 0:d112eae21aff 16 // Switches, DPST, pulled up with 10k resistor; left SW1, right SW2:
tzwell 0:d112eae21aff 17 // SW_EXT connector, from left to right:
tzwell 0:d112eae21aff 18
tzwell 0:d112eae21aff 19 #define MB_SW1 PC_9
tzwell 1:5722459a201f 20 #define MB_SW2 PC_8
tzwell 0:d112eae21aff 21 // Potentiometers; left POT1, right POT2:
tzwell 0:d112eae21aff 22 #define MB_POT1 PA_0
tzwell 0:d112eae21aff 23 #define MB_POT2 PA_1
tzwell 0:d112eae21aff 24 // Common anode, two digit seven-segment display. All signals active at '0':
tzwell 0:d112eae21aff 25 #define MB_SEL1 PB_6
tzwell 0:d112eae21aff 26 #define MB_SEL2 PC_7
tzwell 0:d112eae21aff 27 #define MB_A PA_10
tzwell 0:d112eae21aff 28 #define MB_B PA_9
tzwell 0:d112eae21aff 29 #define MB_C PA_8
tzwell 0:d112eae21aff 30 #define MB_D PB_10
tzwell 0:d112eae21aff 31 #define MB_E PB_5
tzwell 0:d112eae21aff 32 #define MB_F PB_4
tzwell 0:d112eae21aff 33 #define MB_G PB_3
tzwell 0:d112eae21aff 34 // Piezoelectric buzzer, 10k in parallel; Active at '0':
tzwell 0:d112eae21aff 35 #define MB_BUZZ PA_11
tzwell 0:d112eae21aff 36 // SDD1306-based OLED display; Uses I2C_2 to communicate with NUCLEO:
tzwell 0:d112eae21aff 37 #define MB_OLED_SDA PB_14
tzwell 0:d112eae21aff 38 #define MB_OLED_SCL PB_13
tzwell 0:d112eae21aff 39 // ESP8266 WiFi microcontroller; Uses UART_3 to communicate with NUCLEO:
tzwell 0:d112eae21aff 40 #define MB_ESP_RST PA_12
tzwell 0:d112eae21aff 41 #define MB_ESP_TX PC_4
tzwell 0:d112eae21aff 42 #define MB_ESP_RX PC_5
tzwell 0:d112eae21aff 43 #define MB_ESP_EN RESET
tzwell 0:d112eae21aff 44 // mikroBUS pinout, upper leftmost pin is no. 1:
tzwell 0:d112eae21aff 45 #define MB_MIKRO_AN PB_1
tzwell 0:d112eae21aff 46 #define MB_MIKRO_RST PB_12
tzwell 0:d112eae21aff 47 #define MB_MIKRO_CS PD_2
tzwell 0:d112eae21aff 48 #define MB_MIKRO_SCK PC_10
tzwell 0:d112eae21aff 49 #define MB_MIKRO_MISO PC_11
tzwell 0:d112eae21aff 50 #define MB_MIKRO_MOSI PC_12
tzwell 0:d112eae21aff 51 #define MB_MIKRO_SDA PB_14
tzwell 0:d112eae21aff 52 #define MB_MIKRO_SCL PB_13
tzwell 0:d112eae21aff 53 #define MB_MIKRO_TX PB_11
tzwell 0:d112eae21aff 54 #define MB_MIKRO_RX PB_7
tzwell 0:d112eae21aff 55 #define MB_MIKRO_INT PB_2
tzwell 0:d112eae21aff 56 #define MB_MIKRO_PWM PC_6
tzwell 0:d112eae21aff 57 // ANALOG_EXT connector, from left to right:
tzwell 0:d112eae21aff 58 #define MB_AI1 PC_3
tzwell 0:d112eae21aff 59 #define MB_AI2 PC_2
tzwell 0:d112eae21aff 60 #define MB_A0 PA_4