rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
hw_layer
drivers
gpio
drv8860.h
Go to the documentation of this file.
1
/*
2
* drv8860.h
3
*
4
* DRV8860 Smart 8/16-Channel Low-Side Switch
5
*
6
* @date Apr 6, 2020
7
*
8
* @author andreika, (c) 2020
9
* @author Andrey Belomutskiy, (c) 2012-2020
10
*/
11
12
#pragma once
13
14
#include "efifeatures.h"
15
#include <hal.h>
16
17
#define DRV8860_OUTPUTS 16
18
19
/* TODO: add irq support */
20
#define DRV8860_POLL_INTERVAL_MS 500
21
22
struct
drv8860_config
{
23
#if HAL_USE_SPI
24
SPIDriver *
spi_bus
;
25
SPIConfig
spi_config
;
26
#endif
27
struct
{
28
ioportid_t
port
;
29
uint_fast8_t
pad
;
30
}
reset
;
31
};
32
33
int
drv8860_add
(
brain_pin_e
base,
unsigned
int
index,
const
struct
drv8860_config
*cfg);
Gpio
Gpio
Definition
rusefi_hw_enums.h:14
drv8860_add
int drv8860_add(brain_pin_e base, unsigned int index, const struct drv8860_config *cfg)
ioportid_t
GPIO_TypeDef * ioportid_t
Port Identifier.
Definition
hal_pal_lld.h:102
drv8860_config
Definition
drv8860.h:22
drv8860_config::pad
uint_fast8_t pad
Definition
drv8860.h:29
drv8860_config::spi_bus
SPIDriver * spi_bus
Definition
drv8860.h:24
drv8860_config::spi_config
SPIConfig spi_config
Definition
drv8860.h:25
drv8860_config::reset
struct drv8860_config::@32 reset
drv8860_config::port
ioportid_t port
Definition
drv8860.h:28
Generated on Sat Sep 27 2025 00:10:06 for rusEFI by
1.9.8