PER Firmware
Loading...
Searching...
No Matches
main.h File Reference
#include <stdint.h>
#include "common/phal_G4/adc/adc.h"
#include "common/phal_G4/gpio/gpio.h"
Include dependency graph for main.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  raw_adc_values_t
 

Macros

#define CONNECTION_LED_PORT   (GPIOB)
 
#define CONNECTION_LED_PIN   (7)
 
#define HEARTBEAT_LED_PORT   (GPIOB)
 
#define HEARTBEAT_LED_PIN   (9)
 
#define ERROR_LED_PORT   (GPIOD)
 
#define ERROR_LED_PIN   (2)
 
#define IMD_LED_PORT   (GPIOA)
 
#define IMD_LED_PIN   (7)
 
#define BMS_LED_PORT   (GPIOA)
 
#define BMS_LED_PIN   (6)
 
#define PRCHG_LED_PORT   (GPIOC)
 
#define PRCHG_LED_PIN   (4)
 
#define REGEN_LED_PORT   (GPIOC)
 
#define REGEN_LED_PIN   (5)
 
#define UP_BUTTON_PORT   (GPIOC)
 
#define UP_BUTTON_PIN   (6)
 
#define DOWN_BUTTON_PORT   (GPIOC)
 
#define DOWN_BUTTON_PIN   (7)
 
#define RIGHT_BUTTON_PORT   (GPIOC)
 
#define RIGHT_BUTTON_PIN   (8)
 
#define LEFT_BUTTON_PORT   (GPIOC)
 
#define LEFT_BUTTON_PIN   (9)
 
#define START_BUTTON_PORT   (GPIOB)
 
#define START_BUTTON_PIN   (14)
 
#define SELECT_BUTTON_PORT   (GPIOB)
 
#define SELECT_BUTTON_PIN   (15)
 
#define REGEN_TOGGLE_PORT   (GPIOA)
 
#define REGEN_TOGGLE_PIN   (4)
 
#define MARK_DATA_PORT   (GPIOA)
 
#define MARK_DATA_PIN   (5)
 
#define EBB_MINUS_PORT   (GPIOB)
 
#define EBB_MINUS_PIN   (0)
 
#define EBB_PLUS_PORT   (GPIOB)
 
#define EBB_PLUS_PIN   (1)
 
#define TV1_PLUS_PORT   (GPIOB)
 
#define TV1_PLUS_PIN   (11)
 
#define TV1_MINUS_PORT   (GPIOB)
 
#define TV1_MINUS_PIN   (13)
 
#define THROTTLE1_PORT   (GPIOC)
 
#define THROTTLE1_PIN   (2)
 
#define THROTTLE1_ADC_CHANNEL   (8)
 
#define THROTTLE2_PORT   (GPIOC)
 
#define THROTTLE2_PIN   (1)
 
#define THROTTLE2_ADC_CHANNEL   (7)
 
#define REGEN1_PORT   (GPIOC)
 
#define REGEN1_PIN   (3)
 
#define REGEN1_ADC_CHANNEL   (9)
 
#define REGEN2_PORT   (GPIOA)
 
#define REGEN2_PIN   (0)
 
#define REGEN2_ADC_CHANNEL   (1)
 
#define BRAKE1_PRESSURE_PORT   (GPIOA)
 
#define BRAKE1_PRESSURE_PIN   (1)
 
#define BRAKE1_PRESSURE_ADC_CHANNEL   (2)
 
#define BRAKE2_PRESSURE_PORT   (GPIOA)
 
#define BRAKE2_PRESSURE_PIN   (2)
 
#define BRAKE2_PRESSURE_ADC_CHANNEL   (3)
 

Variables

volatile raw_adc_values_t raw_adc_values
 
PHAL_ADC_Handle_t adc_handle
 

Macro Definition Documentation

◆ BMS_LED_PIN

#define BMS_LED_PIN   (6)

◆ BMS_LED_PORT

#define BMS_LED_PORT   (GPIOA)

◆ BRAKE1_PRESSURE_ADC_CHANNEL

#define BRAKE1_PRESSURE_ADC_CHANNEL   (2)

◆ BRAKE1_PRESSURE_PIN

#define BRAKE1_PRESSURE_PIN   (1)

◆ BRAKE1_PRESSURE_PORT

#define BRAKE1_PRESSURE_PORT   (GPIOA)

◆ BRAKE2_PRESSURE_ADC_CHANNEL

#define BRAKE2_PRESSURE_ADC_CHANNEL   (3)

◆ BRAKE2_PRESSURE_PIN

#define BRAKE2_PRESSURE_PIN   (2)

◆ BRAKE2_PRESSURE_PORT

#define BRAKE2_PRESSURE_PORT   (GPIOA)

◆ CONNECTION_LED_PIN

#define CONNECTION_LED_PIN   (7)

◆ CONNECTION_LED_PORT

#define CONNECTION_LED_PORT   (GPIOB)

◆ DOWN_BUTTON_PIN

#define DOWN_BUTTON_PIN   (7)

◆ DOWN_BUTTON_PORT

#define DOWN_BUTTON_PORT   (GPIOC)

◆ EBB_MINUS_PIN

#define EBB_MINUS_PIN   (0)

◆ EBB_MINUS_PORT

#define EBB_MINUS_PORT   (GPIOB)

◆ EBB_PLUS_PIN

#define EBB_PLUS_PIN   (1)

◆ EBB_PLUS_PORT

#define EBB_PLUS_PORT   (GPIOB)

◆ ERROR_LED_PIN

#define ERROR_LED_PIN   (2)

◆ ERROR_LED_PORT

#define ERROR_LED_PORT   (GPIOD)

◆ HEARTBEAT_LED_PIN

#define HEARTBEAT_LED_PIN   (9)

◆ HEARTBEAT_LED_PORT

#define HEARTBEAT_LED_PORT   (GPIOB)

◆ IMD_LED_PIN

#define IMD_LED_PIN   (7)

◆ IMD_LED_PORT

#define IMD_LED_PORT   (GPIOA)

◆ LEFT_BUTTON_PIN

#define LEFT_BUTTON_PIN   (9)

◆ LEFT_BUTTON_PORT

#define LEFT_BUTTON_PORT   (GPIOC)

◆ MARK_DATA_PIN

#define MARK_DATA_PIN   (5)

◆ MARK_DATA_PORT

#define MARK_DATA_PORT   (GPIOA)

◆ PRCHG_LED_PIN

#define PRCHG_LED_PIN   (4)

◆ PRCHG_LED_PORT

#define PRCHG_LED_PORT   (GPIOC)

◆ REGEN1_ADC_CHANNEL

#define REGEN1_ADC_CHANNEL   (9)

◆ REGEN1_PIN

#define REGEN1_PIN   (3)

◆ REGEN1_PORT

#define REGEN1_PORT   (GPIOC)

◆ REGEN2_ADC_CHANNEL

#define REGEN2_ADC_CHANNEL   (1)

◆ REGEN2_PIN

#define REGEN2_PIN   (0)

◆ REGEN2_PORT

#define REGEN2_PORT   (GPIOA)

◆ REGEN_LED_PIN

#define REGEN_LED_PIN   (5)

◆ REGEN_LED_PORT

#define REGEN_LED_PORT   (GPIOC)

◆ REGEN_TOGGLE_PIN

#define REGEN_TOGGLE_PIN   (4)

◆ REGEN_TOGGLE_PORT

#define REGEN_TOGGLE_PORT   (GPIOA)

◆ RIGHT_BUTTON_PIN

#define RIGHT_BUTTON_PIN   (8)

◆ RIGHT_BUTTON_PORT

#define RIGHT_BUTTON_PORT   (GPIOC)

◆ SELECT_BUTTON_PIN

#define SELECT_BUTTON_PIN   (15)

◆ SELECT_BUTTON_PORT

#define SELECT_BUTTON_PORT   (GPIOB)

◆ START_BUTTON_PIN

#define START_BUTTON_PIN   (14)

◆ START_BUTTON_PORT

#define START_BUTTON_PORT   (GPIOB)

◆ THROTTLE1_ADC_CHANNEL

#define THROTTLE1_ADC_CHANNEL   (8)

◆ THROTTLE1_PIN

#define THROTTLE1_PIN   (2)

◆ THROTTLE1_PORT

#define THROTTLE1_PORT   (GPIOC)

◆ THROTTLE2_ADC_CHANNEL

#define THROTTLE2_ADC_CHANNEL   (7)

◆ THROTTLE2_PIN

#define THROTTLE2_PIN   (1)

◆ THROTTLE2_PORT

#define THROTTLE2_PORT   (GPIOC)

◆ TV1_MINUS_PIN

#define TV1_MINUS_PIN   (13)

◆ TV1_MINUS_PORT

#define TV1_MINUS_PORT   (GPIOB)

◆ TV1_PLUS_PIN

#define TV1_PLUS_PIN   (11)

◆ TV1_PLUS_PORT

#define TV1_PLUS_PORT   (GPIOB)

◆ UP_BUTTON_PIN

#define UP_BUTTON_PIN   (6)

◆ UP_BUTTON_PORT

#define UP_BUTTON_PORT   (GPIOC)

Variable Documentation

◆ adc_handle

PHAL_ADC_Handle_t adc_handle
extern

◆ raw_adc_values

volatile raw_adc_values_t raw_adc_values
extern