refactoring - making method available

This commit is contained in:
Andrey 2021-07-13 19:28:03 -04:00
parent f028c4d727
commit b2f09de277
3 changed files with 8 additions and 7 deletions

View File

@ -73,11 +73,6 @@ static void lcdSleep(int period) {
//static char txbuf[1];
#define LCD_PORT_EXP_ADDR 0x20
// todo: use this method wider!
static void writePad(const char *msg, brain_pin_e pin, int bit) {
palWritePad(getHwPort(msg, pin), getHwPin(msg, pin), bit);
}
static bool lcd_HD44780_is_enabled(void) {
/* check for valid LCD setting */
return ((engineConfiguration->displayMode == DM_HD44780) &&

View File

@ -130,7 +130,11 @@ void efiIcuStart(const char *msg, ICUDriver *icup, const ICUConfig *config) {
}
#endif /* HAL_USE_ICU */
#else
void writePad(const char *msg, brain_pin_e pin, int bit) {
palWritePad(getHwPort(msg, pin), getHwPin(msg, pin), bit);
}
#else /* EFI_PROD_CODE */
// This has been made global so we don't need to worry about efiReadPin having access the object
// we store it in, every time we need to use efiReadPin.

View File

@ -1,6 +1,6 @@
/**
* @file io_pins.h
* @brief his file is about general input/output utility methods, not much EFI-specifics
* @brief this file is about general input/output utility methods, not much EFI-specifics
*
* @date Jan 24, 2013
* @author Andrey Belomutskiy, (c) 2012-2020
@ -33,6 +33,8 @@ EXTERNC void efiIcuStart(const char *msg, ICUDriver *icup, const ICUConfig *conf
#endif /* EFI_GPIO_HARDWARE */
void writePad(const char *msg, brain_pin_e pin, int bit);
#if ! EFI_PROD_CODE
#define BRAIN_PIN_COUNT (1 << 8 * sizeof(brain_pin_e))
extern bool mockPinStates[BRAIN_PIN_COUNT];