mirror of https://github.com/rusefi/rusefi-1.git
smart gpio clean-up
This commit is contained in:
parent
2f69beee31
commit
d3745c0f9e
|
@ -343,7 +343,6 @@
|
||||||
|
|
||||||
//#define CONSOLE_THREAD_STACK_SIZE UTILITY_THREAD_STACK_SIZE
|
//#define CONSOLE_THREAD_STACK_SIZE UTILITY_THREAD_STACK_SIZE
|
||||||
|
|
||||||
#define BOARD_EXT_GPIOCHIPS 1
|
|
||||||
#define BOARD_TLE6240_COUNT 1
|
#define BOARD_TLE6240_COUNT 1
|
||||||
#define BOARD_MC33972_COUNT 0
|
#define BOARD_MC33972_COUNT 0
|
||||||
#define BOARD_TLE8888_COUNT 0
|
#define BOARD_TLE8888_COUNT 0
|
||||||
|
|
|
@ -67,9 +67,6 @@
|
||||||
#define BOARD_TLE8888_COUNT 0
|
#define BOARD_TLE8888_COUNT 0
|
||||||
#endif
|
#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
|
#undef EFI_CONSOLE_TX_PORT
|
||||||
#define EFI_CONSOLE_TX_PORT GPIOA
|
#define EFI_CONSOLE_TX_PORT GPIOA
|
||||||
|
|
|
@ -87,7 +87,6 @@
|
||||||
#define BOARD_TLE8888_COUNT 0
|
#define BOARD_TLE8888_COUNT 0
|
||||||
|
|
||||||
// Future: move these outside of efifeatures.h
|
// 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
|
#define BOARD_EXT_PINREPOPINS 24
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -34,9 +34,6 @@
|
||||||
#undef BOARD_TLE8888_COUNT
|
#undef BOARD_TLE8888_COUNT
|
||||||
#define BOARD_TLE8888_COUNT 0
|
#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.
|
* Board oscillators-related settings.
|
||||||
* NOTE: LSE not fitted.
|
* NOTE: LSE not fitted.
|
||||||
|
|
|
@ -146,8 +146,6 @@
|
||||||
#define BOARD_TLE8888_COUNT 1
|
#define BOARD_TLE8888_COUNT 1
|
||||||
#endif
|
#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
|
// todo: move this outside of efifeatures.h
|
||||||
#define BOARD_EXT_PINREPOPINS 24
|
#define BOARD_EXT_PINREPOPINS 24
|
||||||
|
|
|
@ -50,8 +50,6 @@
|
||||||
#define BOARD_TLE8888_COUNT 1
|
#define BOARD_TLE8888_COUNT 1
|
||||||
#endif
|
#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
|
#undef EFI_CAN_SUPPORT
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include "io_pins.h"
|
#include "io_pins.h"
|
||||||
#include "engine_configuration.h"
|
#include "engine_configuration.h"
|
||||||
|
#include "smart_gpio.h"
|
||||||
|
|
||||||
void initPrimaryPins(Logging *sharedLogger);
|
void initPrimaryPins(Logging *sharedLogger);
|
||||||
void initOutputPins(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
void initOutputPins(DECLARE_ENGINE_PARAMETER_SIGNATURE);
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
|
|
||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include "gpio/gpio_ext.h"
|
#include "gpio/gpio_ext.h"
|
||||||
|
#include "smart_gpio.h"
|
||||||
|
|
||||||
#define STRING2(x) #x
|
#define STRING2(x) #x
|
||||||
#define STRING(x) STRING2(x)
|
#define STRING(x) STRING2(x)
|
||||||
|
|
|
@ -16,12 +16,18 @@
|
||||||
#else /* EFI_PROD_CODE */
|
#else /* EFI_PROD_CODE */
|
||||||
#endif /* 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 */
|
/* TLE6240 pins go right after on chips */
|
||||||
#define TLE6240_PIN(n) ((brain_pin_e)((int)BRAIN_PIN_LAST_ONCHIP + 1 + (n)))
|
#define TLE6240_PIN(n) ((brain_pin_e)((int)BRAIN_PIN_LAST_ONCHIP + 1 + (n)))
|
||||||
/* MC33972 pins go right after TLE6240 */
|
/* MC33972 pins go right after TLE6240 */
|
||||||
#define MC33972_PIN(n) ((brain_pin_e)((int)BRAIN_PIN_LAST_ONCHIP + 1 + 16 + (n)))
|
#define MC33972_PIN(n) ((brain_pin_e)((int)BRAIN_PIN_LAST_ONCHIP + 1 + 16 + (n)))
|
||||||
|
|
||||||
void initSmartGpio(void);
|
void initSmartGpio(void);
|
||||||
void startSmartCsPins();
|
void startSmartCsPins(void);
|
||||||
void stopSmartCsPins();
|
void stopSmartCsPins(void);
|
||||||
|
|
||||||
|
|
|
@ -39,8 +39,6 @@
|
||||||
#define BOARD_MC33972_COUNT 0
|
#define BOARD_MC33972_COUNT 0
|
||||||
#define BOARD_TLE8888_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_CLOCK_LOCKS FALSE
|
||||||
|
|
||||||
#define EFI_FSIO TRUE
|
#define EFI_FSIO TRUE
|
||||||
|
@ -92,10 +90,6 @@
|
||||||
#define EFI_CAN_SUPPORT FALSE
|
#define EFI_CAN_SUPPORT FALSE
|
||||||
#define EFI_MAX_31855 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_ELECTRONIC_THROTTLE_BODY TRUE
|
||||||
#define EFI_AUX_PID TRUE
|
#define EFI_AUX_PID TRUE
|
||||||
#define EFI_ICU_INPUTS FALSE
|
#define EFI_ICU_INPUTS FALSE
|
||||||
|
|
|
@ -63,8 +63,6 @@
|
||||||
|
|
||||||
#define EFI_ANALOG_SENSORS TRUE
|
#define EFI_ANALOG_SENSORS TRUE
|
||||||
|
|
||||||
#define BOARD_EXT_GPIOCHIPS 3
|
|
||||||
|
|
||||||
#define EFI_BOARD_TEST FALSE
|
#define EFI_BOARD_TEST FALSE
|
||||||
#define EFI_JOYSTICK FALSE
|
#define EFI_JOYSTICK FALSE
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue