rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
development
hw_layer
poten.h
Go to the documentation of this file.
1
/**
2
* @file poten.h
3
* @brief MCP42010 digital potentiometer driver
4
*
5
* @date Mar 16, 2013
6
* @author Andrey Belomutskiy, (c) 2012-2020
7
*/
8
9
#pragma once
10
11
#include "
global.h
"
12
13
#if HAL_USE_SPI
14
15
#include "
engine_configuration.h
"
16
17
typedef
struct
{
18
SPIDriver *
spi
;
19
SPIConfig
spiConfig
;
20
}
Mcp42010Driver
;
21
22
//void initPotentiometer(Mcp42010Driver *driver, SPIDriver *spi, ioportid_t port, ioportmask_t pin);
23
void
initPotentiometers
();
24
void
setPotResistance
(
Mcp42010Driver
*driver,
int
channel
,
int
resistance);
25
26
#endif
27
channel
uint16_t channel
Definition
adc_inputs.h:104
engine_configuration.h
Main engine configuration data structure.
global.h
initPotentiometers
void initPotentiometers()
Definition
poten.cpp:90
setPotResistance
void setPotResistance(Mcp42010Driver *driver, int channel, int resistance)
Definition
poten.cpp:73
Mcp42010Driver
Definition
poten.h:17
Mcp42010Driver::spiConfig
SPIConfig spiConfig
Definition
poten.h:19
Mcp42010Driver::spi
SPIDriver * spi
Definition
poten.h:18
Generated on Sat Sep 27 2025 00:10:06 for rusEFI by
1.9.8