USB and TLE8888 not working for F4 or F767 #764
This commit is contained in:
parent
164c4b8a2a
commit
a2bb2a2eb8
|
@ -189,19 +189,7 @@ void stopHD44780_pins() {
|
||||||
brain_pin_markUnused(activeConfiguration.bc.HD44780_db7);
|
brain_pin_markUnused(activeConfiguration.bc.HD44780_db7);
|
||||||
}
|
}
|
||||||
|
|
||||||
void lcd_HD44780_init(Logging *sharedLogger) {
|
void startHD44780_pins() {
|
||||||
logger = sharedLogger;
|
|
||||||
|
|
||||||
addConsoleAction("lcdinfo", lcdInfo);
|
|
||||||
|
|
||||||
if (engineConfiguration->displayMode > DM_HD44780_OVER_PCF8574) {
|
|
||||||
warning(CUSTOM_ERR_DISPLAY_MODE, "Unexpected displayMode %d", engineConfiguration->displayMode);
|
|
||||||
// I2C pins need initialization, code needs more work & testing
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
printMsg(logger, "lcd_HD44780_init %d", engineConfiguration->displayMode);
|
|
||||||
|
|
||||||
if (engineConfiguration->displayMode == DM_HD44780) {
|
if (engineConfiguration->displayMode == DM_HD44780) {
|
||||||
// initialize hardware lines
|
// initialize hardware lines
|
||||||
efiSetPadMode("lcd RS", CONFIGB(HD44780_rs), PAL_MODE_OUTPUT_PUSHPULL);
|
efiSetPadMode("lcd RS", CONFIGB(HD44780_rs), PAL_MODE_OUTPUT_PUSHPULL);
|
||||||
|
@ -218,6 +206,22 @@ void lcd_HD44780_init(Logging *sharedLogger) {
|
||||||
palWritePad(getHwPort("lcd", CONFIGB(HD44780_db6)), getHwPin("lcd", CONFIGB(HD44780_db6)), 0);
|
palWritePad(getHwPort("lcd", CONFIGB(HD44780_db6)), getHwPin("lcd", CONFIGB(HD44780_db6)), 0);
|
||||||
palWritePad(getHwPort("lcd", CONFIGB(HD44780_db7)), getHwPin("lcd", CONFIGB(HD44780_db7)), 0);
|
palWritePad(getHwPort("lcd", CONFIGB(HD44780_db7)), getHwPin("lcd", CONFIGB(HD44780_db7)), 0);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void lcd_HD44780_init(Logging *sharedLogger) {
|
||||||
|
logger = sharedLogger;
|
||||||
|
|
||||||
|
addConsoleAction("lcdinfo", lcdInfo);
|
||||||
|
|
||||||
|
if (engineConfiguration->displayMode > DM_HD44780_OVER_PCF8574) {
|
||||||
|
warning(CUSTOM_ERR_DISPLAY_MODE, "Unexpected displayMode %d", engineConfiguration->displayMode);
|
||||||
|
// I2C pins need initialization, code needs more work & testing
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
printMsg(logger, "lcd_HD44780_init %d", engineConfiguration->displayMode);
|
||||||
|
|
||||||
|
startHD44780_pins();
|
||||||
|
|
||||||
chThdSleepMilliseconds(20); // LCD needs some time to wake up
|
chThdSleepMilliseconds(20); // LCD needs some time to wake up
|
||||||
lcd_HD44780_write(LCD_HD44780_RESET); // reset 1x
|
lcd_HD44780_write(LCD_HD44780_RESET); // reset 1x
|
||||||
|
|
|
@ -13,6 +13,7 @@ extern "C"
|
||||||
{
|
{
|
||||||
#endif /* __cplusplus */
|
#endif /* __cplusplus */
|
||||||
|
|
||||||
|
void startHD44780_pins();
|
||||||
void stopHD44780_pins();
|
void stopHD44780_pins();
|
||||||
void lcd_HD44780_init(Logging *sharedLogger);
|
void lcd_HD44780_init(Logging *sharedLogger);
|
||||||
void lcd_HD44780_set_position(uint8_t row, uint8_t column);
|
void lcd_HD44780_set_position(uint8_t row, uint8_t column);
|
||||||
|
|
Loading…
Reference in New Issue