rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
Functions | Variables
hip9011.cpp File Reference

Detailed Description

HIP9011/TPIC8101 driver.

Jan 2017 status: 1) seems to be kind of working - reacts to parameter changes and does produce variable output 2) only one (first) channel is currently used 3) engine control does not yet react to knock since very little actual testing - no engine runs with proven knock yet

http://rusefi.com/forum/viewtopic.php?f=4&t=400 http://rusefi.com/forum/viewtopic.php?f=5&t=778

pin1 VDD pin2 GND

pin8 Chip Select - CS pin11 Slave Data Out - MISO pin12 Slave Data In - MOSI pin13 SPI clock - SCLK

http://www.ti.com/lit/ds/symlink/tpic8101.pdf http://www.intersil.com/content/dam/Intersil/documents/hip9/hip9011.pdf http://www.intersil.com/content/dam/Intersil/documents/an97/an9770.pdf http://e2e.ti.com/cfs-file/__key/telligent-evolution-components-attachments/00-26-01-00-00-42-36-40/TPIC8101-Training.pdf

max SPI frequency: 5MHz max

Date
Nov 27, 2013
Author
Andrey Belomutskiy, (c) 2012-2020 @Spilly

Definition in file hip9011.cpp.

Functions

static void hip_addconsoleActions ()
 
static int hip_wake_driver ()
 
static void startIntegration (HIP9011 *hip)
 
static void endIntegration (HIP9011 *hip)
 
void onStartKnockSampling (uint8_t, float, uint8_t)
 
void hip9011_onFireEvent (uint8_t cylinderNumber, efitick_t nowNt)
 
void hipAdcCallback (float volts)
 
static int hip_testAdvMode ()
 
static int hip_init ()
 
static THD_WORKING_AREA (hipThreadStack, UTILITY_THREAD_STACK_SIZE)
 
static msg_t hipThread (void *arg)
 
void stopHip9011_pins ()
 
void startHip9011_pins ()
 
void initHip9011 ()
 
static void showHipInfo ()
 
static void setPrescaler (int value)
 
static void setHipGain (float value)
 

Variables

static NamedOutputPin intHold (PROTOCOL_HIP_NAME)
 
static NamedOutputPin Cs (PROTOCOL_HIP_NAME)
 
static semaphore_t wake
 
static Hip9011Hardware hardware
 
static float normalizedValue [HIP_INPUT_CHANNELS]
 
static float normalizedValueMax [HIP_INPUT_CHANNELS]
 
static SPIDriver * spi
 
static SPIConfig hipSpiCfg
 
static const charhip_state_names []
 

Function Documentation

◆ endIntegration()

static void endIntegration ( HIP9011 hip)
static

isIntegrating could be 'false' if an SPI command was pending thus we did not integrate during this engine cycle

Definition at line 246 of file hip9011.cpp.

246 {
247 /**
248 * isIntegrating could be 'false' if an SPI command was pending thus we did not integrate during this
249 * engine cycle
250 */
251 if (hip->state == IS_INTEGRATING) {
252 intHold.setLow();
253
255
256 if (instance.adv_mode) {
257 /* read value over SPI in thread mode */
258 hip->state = NOT_READY;
260 } else {
261 /* wait for ADC samples */
263 }
264 }
265}
efitick_t knockSampleTimestamp
hip_state_e state
bool adv_mode
virtual void setLow(const char *msg)
Definition efi_gpio.cpp:450
efitick_t getTimeNowNt()
Definition efitime.cpp:19
static NamedOutputPin intHold(PROTOCOL_HIP_NAME)
static int hip_wake_driver()
Definition hip9011.cpp:213
@ NOT_READY
@ IS_INTEGRATING
@ WAITING_FOR_ADC_TO_SKIP
HIP9011 instance
Here is the call graph for this function:

◆ hip9011_onFireEvent()

void hip9011_onFireEvent ( uint8_t  cylinderNumber,
efitick_t  nowNt 
)

Ignition callback used to start HIP integration and schedule finish

Definition at line 283 of file hip9011.cpp.

283 {
285 return;
286
287 /* We are not checking here for READY_TO_INTEGRATE state as
288 * previous integration may be still in progress, while
289 * we are scheduling next integration start only
290 * knockDetectionWindowStart from now.
291 * Check for correct state will be done at startIntegration () */
292
293 if (cylinderNumber == instance.expectedCylinderNumber) {
294 /* save currect cylinder */
295 instance.cylinderNumber = cylinderNumber;
296
297 /* smart books says we need to sence knock few degrees after TDC
298 * currently I have no idea how to hook to cylinder TDC in correct way.
299 * So schedule start of integration + knockDetectionWindowStart from fire event
300 * Keep this is mind when setting knockDetectionWindowStart */
301 scheduleByAngle(&hardware.startTimer, nowNt,
303 { startIntegration, &instance });
304
305 scheduleByAngle(&hardware.endTimer, nowNt,
307 { endIntegration, &instance });
308 } else {
309 #if EFI_HIP_9011_DEBUG
310 /* out of sync */
313 #endif
314 /* save currect cylinder */
315 instance.cylinderNumber = cylinderNumber;
316 /* Skip integration, call driver task to prepare for next cylinder */
319 }
320}
int8_t cylinderNumber
int8_t expectedCylinderNumber
static constexpr engine_configuration_s * engineConfiguration
static Hip9011Hardware hardware
Definition hip9011.cpp:81
efitick_t scheduleByAngle(scheduling_s *timer, efitick_t nowNt, angle_t angle, action_s action)

Referenced by Engine::onSparkFireKnockSense().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ hip_addconsoleActions()

static void hip_addconsoleActions ( )
static

Definition at line 689 of file hip9011.cpp.

689 {
690 addConsoleAction("hipinfo", showHipInfo);
691 addConsoleActionF("set_gain", setHipGain);
692 addConsoleActionI("set_hip_prescaler", setPrescaler);
693}
void addConsoleActionF(const char *token, VoidFloat callback)
void addConsoleAction(const char *token, Void callback)
Register console action without parameters.
void addConsoleActionI(const char *token, VoidInt callback)
Register a console command with one Integer parameter.
static void setHipGain(float value)
Definition hip9011.cpp:684
static void showHipInfo()
Definition hip9011.cpp:599
static void setPrescaler(int value)
Definition hip9011.cpp:680

Referenced by initHip9011().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ hip_init()

static int hip_init ( )
static

Definition at line 374 of file hip9011.cpp.

374 {
375 int ret;
376
377 /* Just to enable SDO */
378 ret = instance.hw->sendSyncCommand(SET_PRESCALER_CMD(instance.prescaler), NULL);
379 if (ret) {
380 /* NOTE: hip9011/tpic8101 can be in default or advanced mode at this point
381 * If we supposed not to support advanced mode this is definitely error */
383 return ret;
384 }
385
386 /* ...othervice or when no error is reported lets try to switch to advanced mode */
388 uint8_t rx = 0x00;
389 /* enable advanced mode */
390 instance.hw->sendSyncCommand(SET_ADVANCED_MODE_CMD, NULL);
391
392 /* send enable advanced mode again... */
393 instance.hw->sendSyncCommand(SET_ADVANCED_MODE_CMD, NULL);
394
395 /* to get reply on next command */
396 instance.hw->sendSyncCommand(SET_ADVANCED_MODE_CMD, &rx);
397 if (rx != SET_ADVANCED_MODE_REP) {
398 /* this is really a communication problem */
399 return -1;
400 }
401
402 /* now we should be in advanced mode... if chip supports...
403 * set advanced mode flag now so checkResponse will switch to
404 * advanced mode checkig (not implemented) */
405 instance.adv_mode = true;
406
407 ret = hip_testAdvMode();
408 if (ret) {
409 warning(ObdCode::CUSTOM_OBD_KNOCK_PROCESSOR, "TPIC/HIP does not support advanced mode");
410 instance.adv_mode = false;
411 return -1;
412 }
413 }
414
415 #if EFI_HIP_9011_DEBUG
416 /* reset counters now */
419 instance.samples = 0;
420 instance.overrun = 0;
421 instance.unsync = 0;
422 #endif
423
425
426 return 0;
427}
int correctResponsesCount
uint8_t prescaler
Hip9011HardwareInterface * hw
int invalidResponsesCount
virtual int sendSyncCommand(unsigned char command, uint8_t *rx_ptr)=0
bool warning(ObdCode code, const char *fmt,...)
static int hip_testAdvMode()
Definition hip9011.cpp:340
@ READY_TO_INTEGRATE
@ CUSTOM_OBD_KNOCK_PROCESSOR

Referenced by hipThread().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ hip_testAdvMode()

static int hip_testAdvMode ( )
static

Definition at line 340 of file hip9011.cpp.

340 {
341 int ret;
342 uint8_t ret0, ret1, ret2;
343
344 /* do not care about configuration values, we meed replyes only.
345 * correct values will be uploaded later */
346
347 /* A control byte is written to the SDI and shifted with the MSB
348 * first. The response byte on the SDO is shifted out with the MSB
349 * first. The response byte corresponds to the previous command.
350 * Therefore, the SDI shifts in a control byte n and shifts out a
351 * response command byte n − 1. */
352 ret = instance.hw->sendSyncCommand(SET_BAND_PASS_CMD(0), NULL);
353 if (ret)
354 return ret;
355 ret = instance.hw->sendSyncCommand(SET_GAIN_CMD(0), &ret0);
356 if (ret)
357 return ret;
358 ret = instance.hw->sendSyncCommand(SET_INTEGRATOR_CMD(0), &ret1);
359 if (ret)
360 return ret;
361 ret = instance.hw->sendSyncCommand(SET_INTEGRATOR_CMD(0), &ret2);
362 if (ret)
363 return ret;
364
365 /* magic reply bytes from DS Table 2 */
366 if ((ret0 == SET_BAND_PASS_REP) &&
367 (ret1 == SET_GAIN_REP) &&
368 (ret2 == SET_INTEGRATOR_REP))
369 return 0;
370
371 return -1;
372}

Referenced by hip_init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ hip_wake_driver()

static int hip_wake_driver ( )
static

chSemSignalI above requires rescheduling interrupt handlers have implicit rescheduling

Definition at line 213 of file hip9011.cpp.

214{
215 /* Entering a reentrant critical zone.*/
216 syssts_t sts = chSysGetStatusAndLockX();
217 chSemSignalI(&wake);
218 if (!port_is_isr_context()) {
219 /**
220 * chSemSignalI above requires rescheduling
221 * interrupt handlers have implicit rescheduling
222 */
223 chSchRescheduleS();
224 }
225 /* Leaving the critical zone.*/
226 chSysRestoreStatusX(sts);
227
228 return 0;
229}
static semaphore_t wake
Definition hip9011.cpp:79

Referenced by endIntegration(), hip9011_onFireEvent(), and hipAdcCallback().

Here is the caller graph for this function:

◆ hipAdcCallback()

void hipAdcCallback ( float  volts)

Definition at line 322 of file hip9011.cpp.

322 {
323 /* we read in digital mode */
324 if (instance.adv_mode)
325 return;
328 } else if (instance.state == WAITING_FOR_RESULT_ADC) {
329 /* offload calculations to driver thread */
330 if (instance.channelIdx < HIP_INPUT_CHANNELS) {
331 /* normalize to 0..HIP9011_DIGITAL_OUTPUT_MAX */
333 volts * HIP9011_DIGITAL_OUTPUT_MAX / HIP9011_ANALOG_OUTPUT_MAX;
334 }
337 }
338}
uint8_t channelIdx
uint16_t rawValue[HIP_INPUT_CHANNELS]
@ WAITING_FOR_RESULT_ADC

Referenced by onFastAdcComplete().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ hipThread()

static msg_t hipThread ( void *  arg)
static

Definition at line 431 of file hip9011.cpp.

431 {
432 int ret;
433 UNUSED(arg);
434 chRegSetThreadName("hip9011 worker");
435
436 /* This strange code was here before me.
437 * Not sure why we need it */
438#if 0
439 /* Acquire ownership of the bus. */
440 spiAcquireBus(spi);
441 // some time to let the hardware start
442 Cs.setValue(true);
443 chThdSleepMilliseconds(100);
444 Cs.setValue(false);
445 chThdSleepMilliseconds(100);
446 Cs.setValue(true);
447 /* Ownership release. */
448 spiReleaseBus(spi);
449
450 chThdSleepMilliseconds(100);
451#endif
452
453 do {
454 /* retry until success */
455 ret = hip_init();
456 if (ret) {
457 warning(ObdCode::CUSTOM_OBD_KNOCK_PROCESSOR, "TPIC/HIP does not respond: %d", ret);
458 chThdSleepMilliseconds(10 * 1000);
459 }
460 } while (ret);
461
462 while (1) {
463 msg_t msg;
464
465 /* load new/updated settings */
466 instance.handleSettings(Sensor::getOrZero(SensorType::Rpm) DEFINE_PARAM_SUFFIX(PASS_HIP_PARAMS));
467 /* in advanced more driver will set channel while reading integrator value */
468 if (!instance.adv_mode) {
469 /* switch input channel */
470 instance.handleChannel(DEFINE_PARAM_SUFFIX(PASS_HIP_PARAMS));
471 }
472 /* State */
474
475 msg = chSemWaitTimeout(&wake, TIME_INFINITE);
476 if (msg == MSG_TIMEOUT) {
477 /* ??? */
478 } else {
479 int rawValue;
480 /* check now, before readValueAndHandleChannel did not overwrite expectedCylinderNumber */
481 bool correctCylinder = (instance.cylinderNumber == instance.expectedCylinderNumber);
482
483 /* this needs to be called in any case to set proper channel for next cycle */
484 if (instance.adv_mode) {
485 rawValue = instance.readValueAndHandleChannel(DEFINE_PARAM_SUFFIX(PASS_HIP_PARAMS));
486
487 /* spi communication issue? */
488 if (rawValue < 0)
489 continue;
490 }
491
492 /* check that we know channel for current measurement */
493 int idx = instance.channelIdx;
494 if (!(idx < HIP_INPUT_CHANNELS))
495 continue;
496
497 float knockNormalized = 0.0f;
498 float knockVolts = 0.0f;
499
500 /* calculations */
501 if (instance.adv_mode) {
502 instance.rawValue[idx] = rawValue;
503 } else {
504 /* get value stored by callback */
505 rawValue = instance.rawValue[idx];
506 }
507 /* convert 10 bit integer value to 0.0 .. 1.0 float */
508 knockNormalized = ((float)rawValue) / HIP9011_DIGITAL_OUTPUT_MAX;
509 /* convert to magic volts
510 * TODO: remove conversion to volts */
511 knockVolts = knockNormalized * HIP9011_ANALOG_OUTPUT_MAX;
512
513 /* Check for correct cylinder/input */
514 if (correctCylinder) {
515 // TODO: convert knock level to dBv
516 engine->module<KnockController>()->onKnockSenseCompleted(instance.cylinderNumber, knockVolts, instance.knockSampleTimestamp);
517
518 #if EFI_HIP_9011_DEBUG
519 /* debug */
520 normalizedValue[idx] = knockNormalized;
521 normalizedValueMax[idx] = std::max(knockNormalized, normalizedValueMax[idx]);
522 /* counters */
524 #endif
525 } else {
526 /* out of sync event already calculated, nothing to do */
527 }
528 }
529 }
530
531 return -1;
532}
constexpr auto & module()
Definition engine.h:189
void handleSettings(int rpm DEFINE_PARAM_SUFFIX(DEFINE_HIP_PARAMS))
int readValueAndHandleChannel(DEFINE_HIP_PARAMS)
int handleChannel(DEFINE_HIP_PARAMS)
void setValue(const char *msg, int logicValue, bool isForce=false)
Definition efi_gpio.cpp:590
static float getOrZero(SensorType type)
Definition sensor.h:83
static Engine *const engine
Definition engine.h:386
static float normalizedValue[HIP_INPUT_CHANNELS]
Definition hip9011.cpp:86
static float normalizedValueMax[HIP_INPUT_CHANNELS]
Definition hip9011.cpp:87
static int hip_init()
Definition hip9011.cpp:374
static SPIDriver * spi
Definition hip9011.cpp:95
static NamedOutputPin Cs(PROTOCOL_HIP_NAME)
UNUSED(samplingTimeSeconds)

Referenced by initHip9011().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ initHip9011()

void initHip9011 ( )

Definition at line 564 of file hip9011.cpp.

564 {
566 return;
567
569
570 /* load settings */
572
573 efiPrintf("Starting HIP9011/TPIC8101 driver");
574
575 /* init semaphore */
576 chSemObjectInit(&wake, 10);
577 chThdCreateStatic(hipThreadStack, sizeof(hipThreadStack), PRIO_HIP9011, (tfunc_t)(void*) hipThread, NULL);
578
579 #if EFI_HIP_9011_DEBUG
581 #endif
582}
void startHip9011_pins()
Definition hip9011.cpp:547
static msg_t hipThread(void *arg)
Definition hip9011.cpp:431
static void hip_addconsoleActions()
Definition hip9011.cpp:689

Referenced by initHardware().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ onStartKnockSampling()

void onStartKnockSampling ( uint8_t  ,
float  ,
uint8_t   
)

Definition at line 267 of file hip9011.cpp.

267 {
268 /* TODO: @dron0gus: not sure if we need the expectedCylinderNumber logic at all
269
270 Something like this might be right:
271
272 startIntegration(&instance);
273
274 efitick_t windowLength = USF2NT(1e6 * samplingTimeSeconds);
275
276 engine->executor.scheduleByTimestampNt("knock", &hardware.endTimer, getTimeNowNt() + windowLength, { endIntegration, &instance });
277 */
278}

◆ setHipGain()

static void setHipGain ( float  value)
static

Definition at line 684 of file hip9011.cpp.

Referenced by hip_addconsoleActions().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setPrescaler()

static void setPrescaler ( int  value)
static

Definition at line 680 of file hip9011.cpp.

680 {
682}

Referenced by hip_addconsoleActions().

Here is the caller graph for this function:

◆ showHipInfo()

static void showHipInfo ( )
static

Definition at line 599 of file hip9011.cpp.

599 {
601 efiPrintf("hip9011 driver not active");
602 return;
603 }
604
605 efiPrintf("HIP9011: enabled %s",
607
609 return;
610 }
611
612 efiPrintf(" State %s",
614
615 efiPrintf(" Advanced mode: enabled %d used %d",
618
619 efiPrintf(" Input Ch %d (cylinder %d next %d)",
623
624 efiPrintf(" Cyl bore %.2fmm freq %.2fkHz band idx 0x%x",
626 instance.getBand(PASS_HIP_PARAMS),
628
629 efiPrintf(" Integrator %d uS idx 0x%x RPM %d",
632
633 efiPrintf(" Gain %.2f idx 0x%x",
636
637 efiPrintf(" PaSDO=0x%x",
639
640 efiPrintf(" IntHold %s (mode 0x%x)",
643
644 efiPrintf(" Spi %s CS %s (mode 0x%x)",
648
649#if EFI_PROD_CODE
651#endif /* EFI_PROD_CODE */
652
653 efiPrintf(" SPI: good response %d incorrect response %d",
656
657 efiPrintf(" Counters: samples %d overruns %d sync miss %d",
659
660 efiPrintf(" Window start %.2f end %.2f",
663
664 if (!instance.adv_mode) {
665 efiPrintf(" Adc input %d (%.2f V)",
668 }
669
670 for (int i = 0; i < HIP_INPUT_CHANNELS; i++) {
671 efiPrintf(" input[%d] %d -> %.3f (max %.3f)",
672 i,
676 normalizedValueMax[i] = 0.0;
677 }
678}
float adcGetRawVoltage(const char *msg, adc_channel_e hwChannel)
const char * getSpi_device_e(spi_device_e value)
float getBand(DEFINE_HIP_PARAMS)
int getIntegrationTimeByIndex(int index)
uint8_t intergratorIdx
uint8_t bandIdx
uint8_t gainIdx
uint16_t rpmLookup[INT_LOOKUP_SIZE]
const char * boolToString(bool value)
Definition efilib.cpp:18
void printSpiConfig(const char *msg, spi_device_e device)
Definition hardware.cpp:250
static const char * hip_state_names[]
Definition hip9011.cpp:590
const char * hwPortname(brain_pin_e brainPin)

Referenced by hip_addconsoleActions(), and setHipGain().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ startHip9011_pins()

void startHip9011_pins ( )

Definition at line 547 of file hip9011.cpp.

547 {
549 intHold.setValue(1);
551 Cs.setValue(1);
552
553#if EFI_PROD_CODE
555 if (spi == NULL) {
556 // error already reported
557 return;
558 }
561#endif /* EFI_PROD_CODE */
562}
void initPin(const char *msg, brain_pin_e brainPin, pin_output_mode_e outputMode, bool forceInitWithFatalError=false)
Definition efi_gpio.cpp:697
ioportid_t getHwPort(const char *msg, brain_pin_e brainPin)
ioportmask_t getHwPin(const char *msg, brain_pin_e brainPin)
SPIDriver * getSpiDevice(spi_device_e spiDevice)
Definition hardware.cpp:143
static SPIConfig hipSpiCfg
Definition hip9011.cpp:97

Referenced by applyNewHardwareSettings(), and initHip9011().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ startIntegration()

static void startIntegration ( HIP9011 hip)
static

SPI communication is only allowed while not integrating, so we postpone the exchange until we are done integrating

Definition at line 231 of file hip9011.cpp.

231 {
232 if (hip->state == READY_TO_INTEGRATE) {
233 /**
234 * SPI communication is only allowed while not integrating, so we postpone the exchange
235 * until we are done integrating
236 */
237 hip->state = IS_INTEGRATING;
239 } else {
240 #if EFI_HIP_9011_DEBUG
241 hip->overrun++;
242 #endif
243 }
244}
virtual void setHigh(const char *msg)
Definition efi_gpio.cpp:428
Here is the call graph for this function:

◆ stopHip9011_pins()

void stopHip9011_pins ( )

Definition at line 538 of file hip9011.cpp.

538 {
539 intHold.deInit();
540 Cs.deInit();
541#if EFI_PROD_CODE
542 spi = NULL;
543 hipSpiCfg.ssport = NULL;
544#endif
545}
void deInit()
Definition efi_gpio.cpp:788

Referenced by applyNewHardwareSettings().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ THD_WORKING_AREA()

static THD_WORKING_AREA ( hipThreadStack  ,
UTILITY_THREAD_STACK_SIZE   
)
static

Variable Documentation

◆ Cs

NamedOutputPin Cs(PROTOCOL_HIP_NAME) ( PROTOCOL_HIP_NAME  )
static

◆ hardware

HIP9011 instance & hardware
static

◆ hip_state_names

const char* hip_state_names[]
static
Initial value:
=
{
"Not ready/calculating",
"Ready for integration",
"Integrating",
"Waiting for first ADC sample",
"Waiting for second ADC sample"
}

Definition at line 590 of file hip9011.cpp.

591{
592 "Not ready/calculating",
593 "Ready for integration",
594 "Integrating",
595 "Waiting for first ADC sample",
596 "Waiting for second ADC sample"
597};

Referenced by showHipInfo().

◆ hipSpiCfg

SPIConfig hipSpiCfg
static
Initial value:
= {
.circular = false,
#ifdef _CHIBIOS_RT_CONF_VER_6_1_
.end_cb = NULL,
#else
.slave = false,
.data_cb = NULL,
.error_cb = NULL,
#endif
.ssport = NULL,
.sspad = 0,
.cr1 =
SPI_CR1_8BIT_MODE |
SPI_CR1_MSTR |
SPI_CR1_CPHA |
SPI_CR1_BR_0 | SPI_CR1_BR_1 | SPI_CR1_BR_2,
.cr2 =
SPI_CR2_8BIT_MODE
}

Definition at line 97 of file hip9011.cpp.

97 {
98 .circular = false,
99#ifdef _CHIBIOS_RT_CONF_VER_6_1_
100 .end_cb = NULL,
101#else
102 .slave = false,
103 .data_cb = NULL,
104 .error_cb = NULL,
105#endif
106 .ssport = NULL,
107 .sspad = 0,
108 .cr1 =
109 SPI_CR1_8BIT_MODE |
110 SPI_CR1_MSTR |
111 SPI_CR1_CPHA |
112 //SPI_CR1_BR_1 // 5MHz
113 SPI_CR1_BR_0 | SPI_CR1_BR_1 | SPI_CR1_BR_2,
114 .cr2 =
115 SPI_CR2_8BIT_MODE
116};

Referenced by startHip9011_pins(), and stopHip9011_pins().

◆ intHold

NamedOutputPin intHold(PROTOCOL_HIP_NAME) ( PROTOCOL_HIP_NAME  )
static

◆ normalizedValue

float normalizedValue[HIP_INPUT_CHANNELS]
static

Definition at line 86 of file hip9011.cpp.

Referenced by hipThread(), and showHipInfo().

◆ normalizedValueMax

float normalizedValueMax[HIP_INPUT_CHANNELS]
static

Definition at line 87 of file hip9011.cpp.

Referenced by hipThread(), and showHipInfo().

◆ spi

SPIDriver* spi
static

◆ wake

semaphore_t wake
static

Definition at line 79 of file hip9011.cpp.

Referenced by hip_wake_driver(), hipThread(), and initHip9011().

Go to the source code of this file.