rusEFI
The most advanced open source ECU
Loading...
Searching...
No Matches
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
23#if HAL_USE_SPI
24 SPIDriver *spi_bus;
25 SPIConfig spi_config;
26#endif
27 struct {
29 uint_fast8_t pad;
31};
32
33int drv8860_add(brain_pin_e base, unsigned int index, const struct drv8860_config *cfg);
int drv8860_add(brain_pin_e base, unsigned int index, const struct drv8860_config *cfg)
GPIO_TypeDef * ioportid_t
Port Identifier.
uint_fast8_t pad
Definition drv8860.h:29
SPIDriver * spi_bus
Definition drv8860.h:24
SPIConfig spi_config
Definition drv8860.h:25
struct drv8860_config::@32 reset
ioportid_t port
Definition drv8860.h:28