rusefi-1/firmware/development/hw_layer/poten.h

28 lines
572 B
C
Raw Normal View History

2015-07-10 06:01:56 -07:00
/**
* @file poten.h
* @brief MCP42010 digital potentiometer driver
*
* @date Mar 16, 2013
2020-01-13 18:57:43 -08:00
* @author Andrey Belomutskiy, (c) 2012-2020
2015-07-10 06:01:56 -07:00
*/
2020-04-01 16:00:56 -07:00
#pragma once
2015-07-10 06:01:56 -07:00
2018-09-16 19:26:57 -07:00
#include "global.h"
2015-07-10 06:01:56 -07:00
2019-04-12 19:10:57 -07:00
#if HAL_USE_SPI
2015-07-10 06:01:56 -07:00
#include "engine_configuration.h"
typedef struct {
SPIDriver *spi;
SPIConfig spiConfig;
} Mcp42010Driver;
//void initPotentiometer(Mcp42010Driver *driver, SPIDriver *spi, ioportid_t port, ioportmask_t pin);
void initPotentiometers(Logging *sharedLogger DECLARE_ENGINE_PARAMETER_SUFFIX);
2015-07-10 06:01:56 -07:00
void setPotResistance(Mcp42010Driver *driver, int channel, int resistance);
#endif