2015-07-10 06:01:56 -07:00
|
|
|
/**
|
|
|
|
* @file io_pins.h
|
2017-04-21 10:36:51 -07:00
|
|
|
* @brief his file is about general input/output utility methods, not much EFI-specifics
|
2015-07-10 06:01:56 -07:00
|
|
|
*
|
|
|
|
* @date Jan 24, 2013
|
2017-01-03 03:05:22 -08:00
|
|
|
* @author Andrey Belomutskiy, (c) 2012-2017
|
2015-07-10 06:01:56 -07:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef IO_PINS_H_
|
|
|
|
#define IO_PINS_H_
|
|
|
|
|
|
|
|
#include "rusefi_enums.h"
|
2017-04-21 10:36:51 -07:00
|
|
|
#include "main.h"
|
2015-07-10 06:01:56 -07:00
|
|
|
|
2017-04-21 10:53:47 -07:00
|
|
|
#define INITIAL_PIN_STATE -1
|
2015-07-10 06:01:56 -07:00
|
|
|
#define GPIO_NULL NULL
|
|
|
|
|
2017-04-21 10:36:51 -07:00
|
|
|
// mode >= 0 is always true since that's an unsigned
|
|
|
|
#define assertOMode(mode) { \
|
|
|
|
efiAssertVoid(mode <= OM_OPENDRAIN_INVERTED, "invalid pin_output_mode_e"); \
|
|
|
|
}
|
2015-07-10 06:01:56 -07:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* these seven segment display pins are related to unused external tachometer code
|
|
|
|
* I still have the hardware so maybe one day I will fix it, but for now it's just dead code
|
|
|
|
* See https://www.youtube.com/watch?v=YYiHoN6MBqE
|
|
|
|
* todo: this should be re-implemented in a smarter way with some sort of multiplexing anyway
|
|
|
|
*/
|
|
|
|
/* digit 1 */
|
|
|
|
// LED_HUGE_0, // B2
|
|
|
|
// LED_HUGE_1,
|
|
|
|
// LED_HUGE_2,
|
|
|
|
// LED_HUGE_3,
|
|
|
|
// LED_HUGE_4,
|
|
|
|
// LED_HUGE_5,
|
|
|
|
// LED_HUGE_6,
|
|
|
|
// /* digit 2 */
|
|
|
|
// LED_HUGE_7,
|
|
|
|
// LED_HUGE_8,
|
|
|
|
// LED_HUGE_9, // E15
|
|
|
|
// LED_HUGE_10,
|
|
|
|
// LED_HUGE_11,
|
|
|
|
// LED_HUGE_12,
|
|
|
|
// LED_HUGE_13,
|
|
|
|
// /* digit 3 */
|
|
|
|
// LED_HUGE_14,
|
|
|
|
// LED_HUGE_15,
|
|
|
|
// LED_HUGE_16,
|
|
|
|
// LED_HUGE_17,
|
|
|
|
// LED_HUGE_18,
|
|
|
|
// LED_HUGE_19,
|
|
|
|
// LED_HUGE_20,
|
|
|
|
|
2017-04-21 13:20:06 -07:00
|
|
|
#if EFI_GPIO_HARDWARE || defined(__DOXYGEN__)
|
|
|
|
void mySetPadMode2(const char *msg, brain_pin_e pin, iomode_t mode);
|
|
|
|
|
|
|
|
iomode_t getInputMode(pin_input_mode_e mode);
|
|
|
|
void efiIcuStart(ICUDriver *icup, const ICUConfig *config);
|
|
|
|
#endif /* EFI_GPIO_HARDWARE */
|
|
|
|
|
|
|
|
|
2015-07-10 06:01:56 -07:00
|
|
|
#endif /* IO_PINS_H_ */
|