2015-07-10 06:01:56 -07:00
|
|
|
/**
|
2019-04-09 16:12:35 -07:00
|
|
|
* @file hip9011.h
|
2015-07-10 06:01:56 -07:00
|
|
|
* @brief HIP9011/TPIC8101 driver
|
|
|
|
*
|
|
|
|
* @date Nov 27, 2013
|
2020-01-07 21:02:40 -08:00
|
|
|
* @author Andrey Belomutskiy, (c) 2012-2020
|
2015-07-10 06:01:56 -07:00
|
|
|
*/
|
|
|
|
|
2020-01-26 10:58:47 -08:00
|
|
|
#pragma once
|
2015-07-10 06:01:56 -07:00
|
|
|
|
|
|
|
// 0b01110001
|
|
|
|
#define SET_ADVANCED_MODE 0x71
|
|
|
|
|
|
|
|
#define HIP_THREAD_PERIOD 100
|
|
|
|
|
|
|
|
void initHip9011(Logging *sharedLogger);
|
2019-04-19 12:11:00 -07:00
|
|
|
void startHip9001_pins();
|
|
|
|
void stopHip9001_pins();
|
2015-07-10 06:01:56 -07:00
|
|
|
void setHip9011FrankensoPinout(void);
|
2017-05-30 11:23:52 -07:00
|
|
|
#if HAL_USE_ADC
|
2015-07-10 06:01:56 -07:00
|
|
|
void hipAdcCallback(adcsample_t value);
|
2017-05-30 11:23:52 -07:00
|
|
|
#endif /* HAL_USE_ADC */
|
2017-01-06 14:01:28 -08:00
|
|
|
void setHipGain(float value);
|
|
|
|
void setHipBand(float value);
|
|
|
|
void setPrescalerAndSDO(int value);
|
|
|
|
void setKnockThresh(float value);
|
|
|
|
void setMaxKnockSubDeg(int value);
|
2015-07-10 06:01:56 -07:00
|
|
|
|
2020-01-26 10:58:47 -08:00
|
|
|
|