rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
port_mpu_util.h
Go to the documentation of this file.
1/**
2 * @file mpu_util.h
3 *
4 * @date Jul 27, 2014
5 * @author Andrey Belomutskiy, (c) 2012-2020
6 * @author andreika <prometheus.pcb@gmail.com>
7 */
8
9#pragma once
10
11// This is the radical departure from STM32
12#define PORT_SIZE 18
13
14// todo: stm32 ticks are based on 4MHz timer I wonder if these STM32_SYSCLK-based clocks are broken here?!
15#define US_TO_NT_MULTIPLIER (STM32_SYSCLK / 1000000)
16
17// Scheduler queue GPT device
18#define GPTDEVICE GPTD1
19
26
27#ifndef ADC_CR2_SWSTART
28#define ADC_CR2_SWSTART ((uint32_t)0x40000000)
29#endif
30
31#define SPI_CR1_8BIT_MODE 0
32#define SPI_CR2_8BIT_MODE 0
33
34#define SPI_CR1_16BIT_MODE SPI_CR1_DFF
35#define SPI_CR2_16BIT_MODE 0
36
37// TODO
38#define SPI_CR1_24BIT_MODE 0
39#define SPI_CR2_24BIT_MODE 0
40
41#define ADC_MAX_VALUE 4095
BOR_Level_t
@ BOR_Level_None
@ BOR_Level_1
@ BOR_Level_3
@ BOR_Level_2