L9779WD driver #3768

This commit is contained in:
rusefillc 2022-01-10 19:15:04 -05:00
parent 54848b03cb
commit d0d8e95bd3
6 changed files with 31 additions and 3 deletions

View File

@ -156,6 +156,10 @@
#define BOARD_TLE8888_COUNT 1
#endif
#ifndef BOARD_L9779_COUNT
#define BOARD_L9779_COUNT 1
#endif
#ifndef BOARD_DRV8860_COUNT
#define BOARD_DRV8860_COUNT 0
#endif

View File

@ -15,15 +15,17 @@
#undef BOARD_TLE6240_COUNT
#undef BOARD_MC33972_COUNT
#undef BOARD_TLE8888_COUNT
#undef BOARD_L9779_COUNT
#define BOARD_TLE6240_COUNT 0
#define BOARD_MC33972_COUNT 0
#define BOARD_TLE8888_COUNT 0
#define BOARD_L9779_COUNT 0
#undef EFI_MAX_31855
#define EFI_MAX_31855 FALSE
#undef BOARD_EXT_GPIOCHIPS
#define BOARD_EXT_GPIOCHIPS (BOARD_TLE6240_COUNT + BOARD_MC33972_COUNT + BOARD_TLE8888_COUNT + BOARD_DRV8860_COUNT + BOARD_MC33810_COUNT)
#define BOARD_EXT_GPIOCHIPS (BOARD_TLE6240_COUNT + BOARD_MC33972_COUNT + BOARD_TLE8888_COUNT + BOARD_DRV8860_COUNT + BOARD_MC33810_COUNT + BOARD_L9779_COUNT)
#define EFI_USE_COMPRESSED_INI_MSD

View File

@ -4,6 +4,10 @@
* Created on: Jan 10, 2022
*/
#include "pch.h"
#if (BOARD_L9779_COUNT > 0)
#endif /* (BOARD_L9779_COUNT > 0) */

View File

@ -7,3 +7,12 @@
*/
#pragma once
#include "efifeatures.h"
#include <hal.h>
struct l9779_config {
#if HAL_USE_SPI
SPIDriver *spi_bus;
#endif
};

View File

@ -17,6 +17,7 @@
#include "drivers/gpio/mc33810.h"
#include "drivers/gpio/tle8888.h"
#include "drivers/gpio/drv8860.h"
#include "drivers/gpio/l9779.h"
#if (BOARD_TLE6240_COUNT > 0)
// todo: migrate to TS or board config
@ -95,6 +96,14 @@ struct mc33972_config mc33972 = {
};
#endif /* (BOARD_MC33972_COUNT > 0) */
#if (BOARD_L9779_COUNT > 0)
static OutputPin l9779Cs;
struct l9779_config l9779_cfg = {
.spi_bus = NULL,
};
#endif /* (BOARD_L9779_COUNT > 0) */
#if (BOARD_TLE8888_COUNT > 0)
static OutputPin tle8888Cs;
struct tle8888_config tle8888_cfg = {

View File

@ -18,7 +18,7 @@
#if EFI_UNIT_TEST
#define BOARD_EXT_GPIOCHIPS 3
#else
#define BOARD_EXT_GPIOCHIPS (BOARD_TLE6240_COUNT + BOARD_MC33972_COUNT + BOARD_TLE8888_COUNT + BOARD_DRV8860_COUNT + BOARD_MC33810_COUNT)
#define BOARD_EXT_GPIOCHIPS (BOARD_TLE6240_COUNT + BOARD_MC33972_COUNT + BOARD_TLE8888_COUNT + BOARD_DRV8860_COUNT + BOARD_MC33810_COUNT + BOARD_L9779_COUNT)
#endif
void initSmartGpio(void);