NNP STM Generic Remote Module git-main
Loading...
Searching...
No Matches
main.h File Reference

: Header for main.c file. This file contains the common defines of the application. More...

#include "stm32l4xx_hal.h"
#include "data.h"
#include "can.h"

Go to the source code of this file.

Macros

#define I2C2_INT_Pin   GPIO_PIN_12
 
#define I2C2_INT_GPIO_Port   GPIOB
 
#define TIMEOUT_ms(n)
 
#define TIMEOUT_sec(n)
 
#define START_DELAY_MS   4UL
 

Functions

void Error_Handler (void)
 This function is executed in case of error occurrence.
 

Variables

uint8_t RxData [8]
 
uint8_t TxData [8]
 
CAN_TxHeaderTypeDef TxHeader
 
uint32_t TxMailbox
 
CAN_RxHeaderTypeDef RxHeader
 
ADC_HandleTypeDef hadc1
 
DMA_HandleTypeDef hdma_adc1
 
CAN_HandleTypeDef hcan1
 
I2C_HandleTypeDef hi2c2
 
TIM_HandleTypeDef htim2
 
uint8_t ADCres [4]
 

Detailed Description

: Header for main.c file. This file contains the common defines of the application.

Attention

Copyright (c) 2024 STMicroelectronics. All rights reserved.

This software is licensed under terms that can be found in the LICENSE file in the root directory of this software component. If no LICENSE file comes with this software, it is provided AS-IS.

Definition in file main.h.

Macro Definition Documentation

◆ I2C2_INT_GPIO_Port

#define I2C2_INT_GPIO_Port   GPIOB

Definition at line 66 of file main.h.

◆ I2C2_INT_Pin

#define I2C2_INT_Pin   GPIO_PIN_12

Definition at line 65 of file main.h.

◆ START_DELAY_MS

#define START_DELAY_MS   4UL

Definition at line 72 of file main.h.

◆ TIMEOUT_ms

#define TIMEOUT_ms ( n)
Value:
((n))

Definition at line 70 of file main.h.

◆ TIMEOUT_sec

#define TIMEOUT_sec ( n)
Value:
(TIMEOUT_ms((n) * 1000L) - 1)

Definition at line 71 of file main.h.

Function Documentation

◆ Error_Handler()

void Error_Handler ( void )

This function is executed in case of error occurrence.

Return values
None

Definition at line 673 of file main.c.

Referenced by HAL_ADC_MspInit(), HAL_I2C_MspInit(), and SystemClock_Config().

Here is the caller graph for this function:

Variable Documentation

◆ hadc1

ADC_HandleTypeDef hadc1
extern

Definition at line 48 of file main.c.

◆ hcan1

CAN_HandleTypeDef hcan1
extern

Definition at line 51 of file main.c.

◆ hdma_adc1

DMA_HandleTypeDef hdma_adc1
extern

Definition at line 49 of file main.c.

◆ hi2c2

I2C_HandleTypeDef hi2c2
extern

Definition at line 53 of file main.c.

◆ htim2

TIM_HandleTypeDef htim2
extern

Definition at line 55 of file main.c.

◆ RxData

uint8_t RxData[8]
extern

Definition at line 65 of file main.c.

◆ RxHeader

CAN_RxHeaderTypeDef RxHeader
extern

Definition at line 59 of file main.c.

◆ TxData

uint8_t TxData[8]
extern

Definition at line 66 of file main.c.

◆ TxHeader

CAN_TxHeaderTypeDef TxHeader
extern

Definition at line 60 of file main.c.

◆ TxMailbox

uint32_t TxMailbox
extern

Definition at line 71 of file main.c.