smart gpio clean-up

This commit is contained in:
rusefi 2020-04-06 14:13:29 -04:00
parent 2f69beee31
commit d3745c0f9e
11 changed files with 10 additions and 22 deletions

View File

@ -343,7 +343,6 @@
//#define CONSOLE_THREAD_STACK_SIZE UTILITY_THREAD_STACK_SIZE
#define BOARD_EXT_GPIOCHIPS 1
#define BOARD_TLE6240_COUNT 1
#define BOARD_MC33972_COUNT 0
#define BOARD_TLE8888_COUNT 0

View File

@ -67,9 +67,6 @@
#define BOARD_TLE8888_COUNT 0
#endif
// todo: move this outside of efifeatures.h
#define BOARD_EXT_GPIOCHIPS (BOARD_TLE6240_COUNT + BOARD_MC33972_COUNT + BOARD_TLE8888_COUNT)
#undef EFI_CONSOLE_TX_PORT
#define EFI_CONSOLE_TX_PORT GPIOA

View File

@ -87,7 +87,6 @@
#define BOARD_TLE8888_COUNT 0
// Future: move these outside of efifeatures.h
#define BOARD_EXT_GPIOCHIPS (BOARD_TLE6240_COUNT + BOARD_MC33972_COUNT + BOARD_TLE8888_COUNT)
#define BOARD_EXT_PINREPOPINS 24

View File

@ -34,9 +34,6 @@
#undef BOARD_TLE8888_COUNT
#define BOARD_TLE8888_COUNT 0
#undef BOARD_EXT_GPIOCHIPS
#define BOARD_EXT_GPIOCHIPS (BOARD_TLE6240_COUNT + BOARD_MC33972_COUNT + BOARD_TLE8888_COUNT)
/*
* Board oscillators-related settings.
* NOTE: LSE not fitted.

View File

@ -146,8 +146,6 @@
#define BOARD_TLE8888_COUNT 1
#endif
// todo: move this outside of efifeatures.h
#define BOARD_EXT_GPIOCHIPS (BOARD_TLE6240_COUNT + BOARD_MC33972_COUNT + BOARD_TLE8888_COUNT)
// todo: move this outside of efifeatures.h
#define BOARD_EXT_PINREPOPINS 24

View File

@ -50,8 +50,6 @@
#define BOARD_TLE8888_COUNT 1
#endif
// todo: move this outside of efifeatures.h
#define BOARD_EXT_GPIOCHIPS (BOARD_TLE6240_COUNT + BOARD_MC33972_COUNT + BOARD_TLE8888_COUNT)
#undef EFI_CAN_SUPPORT

View File

@ -12,6 +12,7 @@
#include "global.h"
#include "io_pins.h"
#include "engine_configuration.h"
#include "smart_gpio.h"
void initPrimaryPins(Logging *sharedLogger);
void initOutputPins(DECLARE_ENGINE_PARAMETER_SIGNATURE);

View File

@ -8,6 +8,7 @@
#include "global.h"
#include "gpio/gpio_ext.h"
#include "smart_gpio.h"
#define STRING2(x) #x
#define STRING(x) STRING2(x)

View File

@ -16,12 +16,18 @@
#else /* EFI_PROD_CODE */
#endif /* EFI_PROD_CODE */
#if EFI_UNIT_TEST
#define BOARD_EXT_GPIOCHIPS 3
#else
#define BOARD_EXT_GPIOCHIPS (BOARD_TLE6240_COUNT + BOARD_MC33972_COUNT + BOARD_TLE8888_COUNT)
#endif
/* TLE6240 pins go right after on chips */
#define TLE6240_PIN(n) ((brain_pin_e)((int)BRAIN_PIN_LAST_ONCHIP + 1 + (n)))
/* MC33972 pins go right after TLE6240 */
#define MC33972_PIN(n) ((brain_pin_e)((int)BRAIN_PIN_LAST_ONCHIP + 1 + 16 + (n)))
void initSmartGpio(void);
void startSmartCsPins();
void stopSmartCsPins();
void startSmartCsPins(void);
void stopSmartCsPins(void);

View File

@ -39,8 +39,6 @@
#define BOARD_MC33972_COUNT 0
#define BOARD_TLE8888_COUNT 0
#define BOARD_EXT_GPIOCHIPS (BOARD_TLE6240_COUNT + BOARD_MC33972_COUNT + BOARD_TLE8888_COUNT)
#define EFI_CLOCK_LOCKS FALSE
#define EFI_FSIO TRUE
@ -92,10 +90,6 @@
#define EFI_CAN_SUPPORT FALSE
#define EFI_MAX_31855 FALSE
#define BOARD_TLE6240_COUNT 0
#define BOARD_MC33972_COUNT 0
#define BOARD_TLE8888_COUNT 0
#define EFI_ELECTRONIC_THROTTLE_BODY TRUE
#define EFI_AUX_PID TRUE
#define EFI_ICU_INPUTS FALSE

View File

@ -63,8 +63,6 @@
#define EFI_ANALOG_SENSORS TRUE
#define BOARD_EXT_GPIOCHIPS 3
#define EFI_BOARD_TEST FALSE
#define EFI_JOYSTICK FALSE