fome-fw/firmware/emulation/hw_layer/poten.h

30 lines
625 B
C
Raw Normal View History

2014-08-29 07:52:33 -07:00
/**
* @file poten.h
* @brief MCP42010 digital potentiometer driver
*
* @date Mar 16, 2013
* @author Andrey Belomutskiy, (c) 2012-2014
*/
#ifndef POTEN_H_
#define POTEN_H_
#include "main.h"
2014-12-23 19:06:10 -08:00
#if HAL_USE_SPI || defined(__DOXYGEN__)
2014-08-29 07:52:33 -07:00
#include "engine_configuration.h"
typedef struct {
SPIDriver *spi;
SPIConfig spiConfig;
} Mcp42010Driver;
2014-09-20 13:02:57 -07:00
//void initPotentiometer(Mcp42010Driver *driver, SPIDriver *spi, ioportid_t port, ioportmask_t pin);
2014-08-29 07:52:33 -07:00
void initPotentiometers(board_configuration_s *boardConfiguration);
void setPotResistance(Mcp42010Driver *driver, int channel, int resistance);
2014-12-23 19:06:10 -08:00
#endif
2014-08-29 07:52:33 -07:00
#endif /* POTEN_H_ */